Page 1 of 1

Getting text as rtf

Posted: Wed Nov 23, 2005 10:27 pm
by nickg
If I want to use TRichView in Unicode mode, is there a way to get the text and it's rtf formatting codes so I can load the whole thing into a widestring, or an OLEVariant.

No objects or paragraph formatting is required, just font name, style, color, and size. And the text of course :-)

TIA Nick

Posted: Thu Nov 24, 2005 9:21 am
by Sergey Tkachenko
You can use SaveRTFToStream method to save RTF in TStringStream, then get a string from Stream.DataString

Getting rtf text from TRichView

Posted: Thu Nov 24, 2005 8:25 pm
by nickg
Many thanks Sergey, I'll try that.

Regards Nick