Page 1 of 1

Newbie!! Please help

Posted: Tue Oct 15, 2013 1:05 pm
by RogerGrib
Hello everyone.
I'm trying to implement a ScaleRichViewEdit into my application, but I'm having a lot of trouble trying to figure out how to perform some basic tasks, like:
- how to load/save RTF files using ScaleRichViewEdit? (i mean, withou using the "file/save as" dialog)
- how to insert RTF code programmatically?

I looked for answers in the help file and here in the forum, but I could find no guide or tutorial on those subjects.

Any help would be very appretiated.

Thanks

Posted: Tue Oct 15, 2013 1:59 pm
by Sergey Tkachenko
Loading RTF (without Clear, it would add to the end of the editor):

Code: Select all

SRichViewEdit1.Clear
SRichViewEdit1.RichViewEdit.LoadRTF(FileName);
SRichViewEdit1.Format;
Inserting RTF code - what do you mean? Inserting RTF data? If you save RTF content to TMemoryStream, you can insert it in the caret position (as undoable operation):

Code: Select all

Stream.Position := 0;
SRichViewEdit1.ActiveEditor.InsertRTFFromStreamEd(Stream);
TSRichViewEdit contains several invisible internal editors (RichViewEdit, RVHeader, RVFooter, RVNote) of TRichViewEdit type. TRichViewEdit is described in TRichView help, so you need to read both TRichView and ScaleRichView help

Posted: Tue Oct 15, 2013 3:26 pm
by RogerGrib
Thank you very much!