multi color Label Text

sen007

New member
Joined
Nov 11, 2011
Messages
1
Programming Experience
1-3
I wanted to have multiple color for text in single label
controller

e.g.

label1.Text = " $ 480.00 "

What I want is
character $ in Red color and other digits or character after $ in color
blue.
$ 480.00

I cannot use separate
labels for digits and $ due to limitation
 
One option could be to use two labels, one for each color.
Possible also, but more more work, is to custom paint the label using its Paint event.

Another option use a RichTextBox control, set properties ReadOnly:True, Border:None, TabStop:False to make it look and behave mostly like a label. You would then add text with different formatting to it.
 
Back
Top