Change the font of a single character in a TextBox

Diesel

Contributor
Joined
Aug 18, 2003
Messages
662
For example:

When the user enters any vowel into the Textbox, I want it to appear in Bold.
 
Use a richtextbox

Diesel said:
For example:

When the user enters any vowel into the Textbox, I want it to appear in Bold.

Use a richtextbox. It has the capabilities to style text. You will have to write the code to detect the vowel yourself. Maybe you can use the keypress event.
 
It probably can with a custom user contorl inheriting a textbox. Then bold the vowels in the Overrides On Paint Sub.......I personally think a rich text box might be eaiser.
 
I can't inherit from Textbox. FYI, this is not a practical question, just an informative one.
 
IT CAN INHERIT FROM A TEXTBOX!!!! and the coding of this type of textbox is quite simple!!! Maybe after you've written some inherited textbox user controls you'll reframe from silly statements like "I can't inherit from TextBox" in the future and simply ask now!!!
 
For the purposes of this question, I can't inherit from a textbox. If you don't know how to do it, don't keep guessing.
 
Diesel, you are a mass of confussion and contradiction!!!

I want to know if it can be done in a Textbox.
I answered yes, it can be done.
If you don't know how to do it, don't keep guessing
I do know how to do it and have done it with very complicated Chinese characters, that's why I suggested it to you, the person who doesn't know how to do it.
 
Back
Top