Page 1 of 1
How to keep the margins configuration in the file
Posted: Mon Feb 13, 2012 12:19 pm
by alexandreq
Hello Sergey,
When I give a double click on margins it calls this code:
srvActionPageSetup1.ExecuteTarget(Editor);
When I change my page configuration, for example, from landscape to portrait or vice versa, the new parameters page is not keept in my db.
When I close the system and open it again, my page returns to the same configuration and didn't keep my preferences.
What is wrong with this code? Something missing? I notice when I change the page configuration, my db state doesn't change to dsedit, for example.
Posted: Wed Feb 15, 2012 5:28 am
by Sergey Tkachenko
Open SRVActions.pas, find TsrvActionPageSetup.ExecuteTarget.
Change
to
Code: Select all
if Edit.RichViewEdit.CanChange then
frm.Apply(Edit);
This fix will be included in the next update.
Posted: Wed Feb 15, 2012 10:28 am
by alexandreq
Hi Sergey,
I didn't find the SRVActions.pas, only RichViewActions,
My version is 12 and the code that I have inside the procedure is:
procedure TrvActionPageSetup.ExecuteTarget(Target: TObject);
var frm: TfrmRVPageSetup;
begin
frm := TfrmRVPageSetup.Create(Application);
try
if MarginsUnits=rvpmuInches then
frm.UseInches;
if frm.Init and (frm.ShowModal=mrOk) then begin
frm.Apply;
if Assigned(FOnChange) then
FOnChange(Self);
end;
finally
frm.Free;
end;
end;
When I tried to add your code, Delphi doesn't find the Edit.
What Can I do?
I also call this code when I give double click on the margins, when I do this, I run this code:
srvActionPageSetup1.ExecuteTarget(Editor);
Maybe can it be worked around here?
thanks
Posted: Wed Feb 15, 2012 3:37 pm
by Sergey Tkachenko
SRVActions.pas is included in ScaleRichView. It contains TsrvActionPageSetup.
TrvActionPageSetup from RichViewActions.pas is a different action, it is for TRichViewEdit, not TSRichViewEdit.
Posted: Wed Feb 15, 2012 4:25 pm
by alexandreq
Sergey,
I don't have .pas from this file SRVActions, only DCU.
My Version is 3.03 of my scaleRichView.
is it a possible to work around with this in my code?
Posted: Wed Feb 15, 2012 5:04 pm
by Sergey Tkachenko
TrvActionPageSetup is useless for ScaleRichView. It changes properties of TRVPrint component which is not used by ScaleRichView.
Do you use a trial version of ScaleRichView?
Posted: Wed Feb 15, 2012 5:30 pm
by alexandreq
Hi Sergey,
This version is not a trial version.
In the example of the demo that come with the component, on the event onMarginDbClick is used this code:
srvActionPageSetup1.ExecuteTarget(ActiveEditor);
Well, what do you suggest me to do whether TrvActionPageSetup is useless?
Posted: Wed Feb 15, 2012 6:57 pm
by Sergey Tkachenko
If you have a full version of ScaleRichView, it must include all source files, including SRVActions.pas.
Posted: Wed Feb 15, 2012 7:22 pm
by alexandreq
Well, this computer that I work doesn't have the .pas of this file
I don't know why and I am new in company.
is it other way to work around of this?
thanks
Posted: Thu Feb 16, 2012 4:18 pm
by Sergey Tkachenko
I can send you a source code if I will be able to identify you as a registered user.
What is the company name or email address that was used when ordering? Please send this information in a private message or email.
Posted: Thu Feb 16, 2012 6:18 pm
by alexandreq
Hi sergey
Unfortunately nobody know about this here in company.
It seems that the guys that worked here before me brought this component with him and installed.
Now, I don't know what to do.
sorry
Posted: Thu Feb 16, 2012 6:38 pm
by Sergey Tkachenko
Answered in a private message