Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to put bold charac ters in a string

JamesJames Member Posts: 217
I need to use a StringBuilder to create a string that will be passed to various processes where it will be displayed, printed, put in a web page, etc.

Some of the characters need to be bold and/or have other font properties added.

How do I do this w/out using rich text?

Thanks,

James

Comments

  • iwilld0itiwilld0it Member Posts: 1,134
    : I need to use a StringBuilder to create a string that will be passed to various processes where it will be displayed, printed, put in a web page, etc.
    :
    : Some of the characters need to be bold and/or have other font properties added.
    :
    : How do I do this w/out using rich text?
    :
    : Thanks,
    :
    : James
    :

    Well if your string is printed in a web page then you would use html ...

    [code]
    myStringBuilder.Append("Bold Text")
    myStringBuilder.Append("Underlined Text")
    [/code]
  • RelmanRelman Member Posts: 104
    : : I need to use a StringBuilder to create a string that will be passed to various processes where it will be displayed, printed, put in a web page, etc.
    : :
    : : Some of the characters need to be bold and/or have other font properties added.
    : :
    : : How do I do this w/out using rich text?
    : :
    : : Thanks,
    : :
    : : James
    : :
    :
    : Well if your string is printed in a web page then you would use html ...
    :
    : [code]
    : myStringBuilder.Append("Bold Text")
    : myStringBuilder.Append("Underlined Text")
    : [/code]
    :

    Basically what iwilldoit is saying is that a string cant have font properties - the thing that displays it decides what the properties will be. So, If you want to makes some text bold and whatever, you have to create some type of parser (or use the already made web browser parser) to read the formatting values in your string and show the string with those properties. Having said that, it really depends on what you are using to display your string to answer your question.

    Relman

Sign In or Register to comment.