summaryrefslogtreecommitdiff
path: root/src/reportengine
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-08-28 13:34:00 +0100
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-08-28 13:34:00 +0100
commit55e69bc624c6548cae1ae241fe75d3403f8d998e (patch)
tree80212d2f51ba0d9730a05ed6e6a2a2e662f2206f /src/reportengine
parent08a89fa0ce538e6b78aa2630e28f8b19ceeea559 (diff)
downloadfpGUI-55e69bc624c6548cae1ae241fe75d3403f8d998e.tar.xz
pdf: introduced a PreviewMargin property
This is the margin of empty space around the preview page, so it stands away from bounding widgets.
Diffstat (limited to 'src/reportengine')
-rw-r--r--src/reportengine/u_visu.pas11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/reportengine/u_visu.pas b/src/reportengine/u_visu.pas
index 9e873fc2..87b6f1b9 100644
--- a/src/reportengine/u_visu.pas
+++ b/src/reportengine/u_visu.pas
@@ -72,6 +72,7 @@ type
L_NumPageSect: TfpgLabel;
L_FromPageSect: TfpgLabel;
L_NbrPageSect: TfpgLabel;
+ FPreviewMargin: integer;
procedure FormShow(Sender: TObject);
procedure Bt_CloseClick(Sender: TObject);
procedure Bt_PrintClick(Sender: TObject);
@@ -90,6 +91,7 @@ type
public
constructor Create(AOwner: TComponent; AImprime: T_Report); reintroduce;
destructor Destroy; override;
+ property PreviewMargin: integer read FPreviewMargin write SetPreviewMargin;
end;
var
@@ -406,6 +408,13 @@ begin
end;
end;
+procedure TF_Visu.SetPreviewMargin(AValue: integer);
+begin
+ if FPreviewMargin = AValue then
+ Exit;
+ FPreviewMargin := AValue;
+end;
+
procedure TF_Visu.E_NumPageKeyPress(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: Boolean);
var
CptSect, CptPage, CptPageSect: integer;
@@ -473,6 +482,8 @@ begin
BackgroundColor := fpgColor(51,51,51); // black/brown or should be use clShadow2 for theming abilities??
OnShow := @FormShow;
+ FPreviewMargin := 10;
+
CreateReportImages;
Bv_Command := CreateBevel(Self, 0, 0, Width, 50, bsBox, bsRaised);