Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RTF Textbox

2 views
Skip to first unread message

Patrick F

unread,
May 22, 2006, 5:20:03 PM5/22/06
to

Hi,

I got a Richtextbox in my program, is there a easy way to create a new
line with a font size that i want and a spicific color?
like:
rtfbox.AddTextToNewLine("test1", Color.Red, Size.12, Font.Bold, other
options here);
rtfbox.AddTextToNewLine("test2", Color.Blue, Size.10, Font.Italic, other
options here);

Is this possible?, any guides of how to add data to a RTB?

Patrick

*** Sent via Developersdex http://www.developersdex.com ***

Galcho[MCSD.NET]

unread,
May 22, 2006, 5:26:37 PM5/22/06
to
you have to follow RTF specification and to set .Rtf property according
new text.

see here for information
http://www.biblioscape.com/rtf15_spec.htm

I would suggest to create osme documents with WordPad, save them to HDD
and open from Notepad. thus you can see what are changes.

I hope this helps
Galin Iliev[MCSD.NET]
www.galcho.com

Kevin Spencer

unread,
May 22, 2006, 5:56:41 PM5/22/06
to
Set the RichTextBox.SelectionColor property. Once set, the font color will
be whatever you set it to. This applies to text that is appended to the
RichTextBox after setting the property. Otherwise, you can select text
already in the RichTextBox and set the SelectionColor to color that text.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

The man who questions opinions is wise.
The man who quarrels with facts is a fool.

"Patrick F" <da...@pafo.net> wrote in message
news:%23DEh%23VefG...@TK2MSFTNGP02.phx.gbl...

0 new messages