Is there a way to change the color of a portion of a string?

  • Thread starter Thread starter Moondog
  • Start date Start date
M

Moondog

My string looks something like this:

strCaption = "Item Number " & strItemNumber


I would like to present the strItemNumber portion in a different color
than the rest of the string so it stands out more. Is there a way to
do this?


Looking for something like:

strCaption = "Item Number " & SetColor("Yellow") & strItemNumber


Thanks,
(e-mail address removed)
 
* (e-mail address removed) (Moondog) scripsit:
My string looks something like this:

strCaption = "Item Number " & strItemNumber


I would like to present the strItemNumber portion in a different color
than the rest of the string so it stands out more. Is there a way to
do this?

You will have to use the RichTextBox for this purpose. It supports
individual color for each character ('SelectionColor', 'Select').
 
Back
Top