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').
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top