How to keep the margins configuration in the file
-
- Posts: 184
- Joined: Wed Jan 18, 2012 6:22 pm
How to keep the margins configuration in the file
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.
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.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Open SRVActions.pas, find TsrvActionPageSetup.ExecuteTarget.
Changeto
This fix will be included in the next update.
Change
Code: Select all
frm.Apply(Edit);
Code: Select all
if Edit.RichViewEdit.CanChange then
frm.Apply(Edit);
-
- Posts: 184
- Joined: Wed Jan 18, 2012 6:22 pm
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
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
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 184
- Joined: Wed Jan 18, 2012 6:22 pm
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 184
- Joined: Wed Jan 18, 2012 6:22 pm
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 184
- Joined: Wed Jan 18, 2012 6:22 pm
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 184
- Joined: Wed Jan 18, 2012 6:22 pm
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: