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
Newbie!! Please help
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Loading RTF (without Clear, it would add to the end of the editor):
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):
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
Code: Select all
SRichViewEdit1.Clear
SRichViewEdit1.RichViewEdit.LoadRTF(FileName);
SRichViewEdit1.Format;
Code: Select all
Stream.Position := 0;
SRichViewEdit1.ActiveEditor.InsertRTFFromStreamEd(Stream);