Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Color String

Status
Not open for further replies.

missippi

IS-IT--Management
Joined
Feb 8, 2001
Messages
42
Location
US
I am trying to change one character color of a string.

ie. VISUAL BASIC i JUST WANT TO CHANGE COLOR OF THE "B" OF THIS STRING.

 
What control are you using to display the text?

The standard VB Label and Textbox controls will not do this. You'll need to use the RichEdit control, or use a browser control and embed the HTML needed to turn it red/blue/etc.

One way (and it's sort of cheesy) is to use three labels. One for the string before it turns red, one for the red text, and one for the text afterwards. You'd have to write code to position them correctly.

Chip H.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top