Text Color

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Randy

    #1

    Text Color

    Hello All,
    I want to change the color of a string mid way into the string.
    Example: Say I have a string "This is a test"
    What I want to do is have "test" a different color from the rest of the
    string. Is there any way to do this?
    Thanks


  • Jon Skeet

    #2
    Re: Text Color

    Randy <nas_man@hotmai l.com> wrote:[color=blue]
    > I want to change the color of a string mid way into the string.
    > Example: Say I have a string "This is a test"
    > What I want to do is have "test" a different color from the rest of the
    > string. Is there any way to do this?[/color]

    That really depends on how you're displaying the string. A string is
    just a sequence of characters - it doesn't have a colour or anything
    like that. However, if you're displaying the text in a RichTextBox or
    something like that, you should be able to change the colour of part of
    the string.

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    Working...