Click to See Complete Forum and Search --> : [RESOLVED] RichEdit & text type
Saeed
October 9th, 2008, 07:36 PM
I am not sure if this control woudl allow me to display various Text types (BOLD , Normal , Italic ) in one control .
If it does not , do you know of any man made control that can do that?
Cheers
Saeed
October 9th, 2008, 09:40 PM
Solution:
richTextBox1.Rtf = @"{\rtf1\ansi This text is in \b bold\b0, " +
@"this is in \i italics\i0, " +
@"and this is \ul underlined\ul0.}";
for those that may have the same problem
dannystommen
October 10th, 2008, 03:06 AM
You could also do this:
Font font = new Font("Arial", 10, FontStyle.Bold);
richTextBox1.SelectionFont = font;
richTextBox1.AppendText("This is bold");
Fontstyle is an enumeration where can choose between regular, bold, italic, underline and strikeout.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.