Hello,
I use this:
SRichViewEdit1.RichViewEdit.LoadRTF( 'e:\MyRtf.rtf');
SRichViewEdit1.RichViewEdit.Format;
The big problem is that this deletes the whole header (picture and text all).
How can I avoid this?
Thank you very much!
LoadRTF deletes the header
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Yes, SRichViewEdit1.RichViewEdit.LoadRTF replaces existing header to header from RTF.
Workaround:
To restore normal settings, call
Workaround:
Code: Select all
SRichViewEdit1.RichViewEdit.RTFReadProperties.SetHeader(nil);
SRichViewEdit1.RichViewEdit.RTFReadProperties.SetFooter(nil);
Code: Select all
SRichViewEdit1.RichViewEdit.RTFReadProperties.SetHeader(SRichViewEdit1.RVHeader.RVData);
SRichViewEdit1.RichViewEdit.RTFReadProperties.SetFooter(SRichViewEdit1.RVFooter.RVData);
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Please note that we plan to change headers and footers in ScaleRichView in the next update.
Currently, there is only one header and one footer, they are stored and displayed in RVHeader and RVFooter.
In the next update, TSRichViewEdit will have 6 of them:
(header, footer) * (first page, even pages, odd pages).
Using 6 editors is not rational, so headers and footers will be stored in separate properties, and loaded to RVHeader and RVFooter only for editing (similarly, like notes are loaded to RVNote).
So the code for restoring normal settings will be different.
Currently, there is only one header and one footer, they are stored and displayed in RVHeader and RVFooter.
In the next update, TSRichViewEdit will have 6 of them:
(header, footer) * (first page, even pages, odd pages).
Using 6 editors is not rational, so headers and footers will be stored in separate properties, and loaded to RVHeader and RVFooter only for editing (similarly, like notes are loaded to RVNote).
So the code for restoring normal settings will be different.