ucla11
asked on
Formating only a part of a String
I have text that is added to a textbox and I want to BOLD only a certain section of the string.
Example:
(1,000) .... One Thousand
I just want the 1,000 font bolded
the code is as followes:
Text3.text = Text3.text & "(" & Label3.Caption & ")" & Text2.text VbCrLf
The Label3.Caption is the Number (1,000) the Text2.text is that number convert to a text form and as the user enters more numbersto be converted it adds them to to the next line of the textbox.
Should I use a Listbox instead of a text box?
I would like to make the Number (Label3.Caption) Font Bold so that it stands out.
Thanks.....
Example:
(1,000) .... One Thousand
I just want the 1,000 font bolded
the code is as followes:
Text3.text = Text3.text & "(" & Label3.Caption & ")" & Text2.text VbCrLf
The Label3.Caption is the Number (1,000) the Text2.text is that number convert to a text form and as the user enters more numbersto be converted it adds them to to the next line of the textbox.
Should I use a Listbox instead of a text box?
I would like to make the Number (Label3.Caption) Font Bold so that it stands out.
Thanks.....
I would use a RichTextBox
ASKER
how the RichTextBox control work exacty?
Why don't u use a normal textbox with MultiLine property set to "true"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you CANT do this with a normal TextBox
The question is already answered man
Question:
how the RichTextBox control work exacty?
Answer:
RichTextBox1.Select(RichTe xtBox1.Tex t.IndexOf( "1000"), 4)
RichTextBox1.SelectionFont = New Font("Verdana", 12, FontStyle.Bold)
RichTextBox1.SelectionColo r = Color.Red
-------------------------- ---------- ---------- ---------- --
Comment:
Why don't u use a normal textbox with MultiLine property set to "true"
Argument:
you CANT do this with a normal TextBox
how the RichTextBox control work exacty?
Answer:
RichTextBox1.Select(RichTe
RichTextBox1.SelectionFont
RichTextBox1.SelectionColo
--------------------------
Comment:
Why don't u use a normal textbox with MultiLine property set to "true"
Argument:
you CANT do this with a normal TextBox