Answered by:
Formatting TextBox.Text at Run-Time

Question
-
Hi
Is it at all possible to format a part of (say the first line) TextBox text at run time in VB 2010 Express? If yes how please?
Thanks
ssTuesday, November 22, 2011 11:19 AM
Answers
-
Better use RichTextBox control.
Thanks,
A.m.a.L Hashim
Dot Net Goodies
Tuesday, November 22, 2011 12:32 PM -
The textbox does not offer formating, but rather expects a string. If you want to format part of a string, then you would use a StringWriter, StringBuilder, or String.Format to prepare the format of the data represented by the object.If you are talking about colors/fonts/boldness, then A.m.a.l. Hashim has provided a good answer, as the RichTextBox provides those functionalities.
--
MikeTuesday, November 22, 2011 12:45 PM
All replies
-
Better use RichTextBox control.
Thanks,
A.m.a.L Hashim
Dot Net Goodies
Tuesday, November 22, 2011 12:32 PM -
The textbox does not offer formating, but rather expects a string. If you want to format part of a string, then you would use a StringWriter, StringBuilder, or String.Format to prepare the format of the data represented by the object.If you are talking about colors/fonts/boldness, then A.m.a.l. Hashim has provided a good answer, as the RichTextBox provides those functionalities.
--
MikeTuesday, November 22, 2011 12:45 PM -
Thank You both Hashim and Mike.
SidaanWednesday, November 23, 2011 9:26 PM