Underlining Text in Textboxes...

Drags111

Member
Joined
Oct 21, 2007
Messages
20
Programming Experience
1-3
Is there a code that can make text underlined? Like:

Textbox.underlined = true

I know that doesnt exist, but is there something like that?

I am using Visual Studios 2008
 
Hmm it didnt make the text afterwords underlined.

VB.NET:
            Output1.Font = New Font(Output1.Font.Name, Output1.Font.Size, FontStyle.Underline)
            Output1.Text = Output1.Text & Num3.Text & "n"

Its supposed to underline the Num3.text, and N. so lets say Num3.text = 5, it should underline 5n like this: 5n, but its not doing that
 
VB.NET:
Output1.Text = Output1.Text & Num3.Text & "n"
Output1.Font = New Font(Output1.Font.Name, Output1.Font.Size, FontStyle.Underline)
 
i'm not sure but i think its all or nothing with standard textboxes
underlined or not underlined.
try a RTFtextbox
 
Im using a rich textbox
That's probably something you should have mentioned in the first place, don't you think? Are you using the Windows Forms RichTextBox or the Windows Presentation Foundation RichTextBox?
 
first you have to select the text you want underlined

then

VB.NET:
rtb1.SelectionFont = New Font(rtb1.Font.Name, rtb1.Font.Size, FontStyle.Underline)
 
Where you have the 5n underlined, you should have the 10 underlines with a 5 printed below it to show that both sides of the equals is divided by 5.

At least all 9 of my math classes (grade 9 through college calc) shows math operations that way.
 
Back
Top