Page 1 of 1
Need help for save and restore the page properties
Posted: Wed Oct 22, 2008 10:26 am
by Andy
Please tell me,
What is the correct way to save and restore the document.
So that the document will be loaded as they would at least saving or leaved.
Andy
Posted: Wed Oct 22, 2008 1:29 pm
by Andy
I see a 3 different structures for layout but I don't know which is the right one.
When I set some property the whole layout is destroyed.
Attention: it's for ScaleRichView !
Andy
Posted: Wed Oct 22, 2008 4:08 pm
by Sergey Tkachenko
SRichViewEdit1.RichViewEdit.SaveRVFToStream/SaveRVF and
SRichViewEdit1.RichViewEdit.LoadRVFFromStream/LoadRVF.
As for the layout question, I do not understand. Please give more details.
Posted: Wed Oct 22, 2008 4:30 pm
by Andy
For saving I use your suggested method. -> SaveRVF
For loading I have troubles:
With "SRVE.RichViewEdit.LoadRVF(FNAme)"
I get an exception out of maximun (-1)
class TCustomRVData; unit-> CRVData.pas
always on the second try , it works.
But with "rvActionsResource.rvActionOpen1.LoadFile" it worky always.
What is the difference ?
Andy
Posted: Wed Oct 22, 2008 4:52 pm
by Sergey Tkachenko
Do you call SRVE.RichViewEdit.Format after LoadRVF?
Posted: Wed Oct 22, 2008 5:59 pm
by Andy
Shame over me,
yes,I have forget format-method.
Sorry.
But now back to my problem.
In the layout - sructure all is ok (by loading), but it will not restore by loading document. (Missing update PageProperty)
What have forget now ?
Posted: Wed Oct 22, 2008 6:06 pm
by Sergey Tkachenko
Do you save in RVF format?
What's you version of ScaleRichView?
Are rvfoSaveDocProperties and rvfoLoadDocProperties included in SRVE.RichViewEdit.RVFOptions? (must be by default)
Posted: Wed Oct 22, 2008 6:32 pm
by Andy
Yes,I save in RVF Format.
Version ScaleRichViw is 1.5.1
Load/Save Docproperties are TRUE
In debugger I see that the Margins will correct save and correct loaded.
But this parameter will not activatet to the pageproperty.
Posted: Wed Oct 22, 2008 6:50 pm
by Andy
When direct after: SRVE.RichViewEdit.LoadRVF(FileName);
I wrote this code
SRVE.SetMargin(SRVE.RichViewEdit.LeftMargin ,
SRVE.RichViewEdit.TopMargin ,
SRVE.RichViewEdit.RightMargin,
SRVE.RichViewEdit.BottomMargin);
Then all is fine.
But I have think my ScaleRichView-component make this automatically !
Or really not ?
Posted: Thu Oct 23, 2008 6:40 pm
by Sergey Tkachenko
Try updating to 1.5.2 and check if the problem persists.
Posted: Sun Nov 02, 2008 11:00 am
by Sergey Tkachenko
Unfortunately, SRVE cannot update margins automatically after calling SRVE.RichViewEdit.LoadRVF.
You need to call
Code: Select all
SRVE.RichViewEdit.LoadRVF(...); // or LoadRTF
SRVE.SetRVMargin;
SRVE.Format;
Or you can call