GridPrinter: More options to control the preview's toolbar.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8609 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-11-11 22:59:52 +00:00
parent 8bd3387381
commit 1fe764c55e
12 changed files with 1089 additions and 480 deletions

View File

@ -65,6 +65,10 @@ resourcestring
RSPageMarginsButtons = 'Page margins button';
RSHeaderFooterButton = 'Header/footer button';
RSPrintOrderButtons = 'Print order: colums first or rows first';
RSCenterButtons = 'Buttons for centering grid on page';
RSPageSetupButton = 'Page setup dropdown-menu';
RSPageNumberInfoPanel = 'Page number info';
RSZoomLevelInfoPanel = 'Zoom level info';
{ TMainForm }
@ -92,6 +96,10 @@ begin
if ccbPreviewOptions.Checked[4] then Include(optns, ppoMarginsBtn);
if ccbPreviewOptions.Checked[5] then Include(optns, ppoHeaderFooterBtn);
if ccbPreviewOptions.Checked[6] then Include(optns, ppoPrintOrderBtns);
if ccbPreviewOptions.Checked[7] then Include(optns, ppoCenterBtns);
if ccbPreviewOptions.Checked[8] then Include(optns, ppoPageSetupBtn);
if ccbPreviewOptions.Checked[9] then Include(optns, ppoPageNumberInfo);
if ccbPreviewOptions.Checked[10] then Include(optns, ppoZoomLevelInfo);
GridPrintPreviewDialog1.Options := optns;
end;
@ -110,7 +118,7 @@ begin
cmbDialogs.ItemIndex := 2;
ccbPreviewOptions.ItemIndex := 0;
for i := 0 to ccbPreviewOptions.Count-1 do
ccbPreviewOptions.Checked[i] := true;
ccbPreviewOptions.Checked[i] := TGridPrintPreviewOption(i) in DEFAULT_GRIDPRN_OPTIONS;
FLanguagesDir := ExpandFileName(Application.Location + '../../languages/');
PopulateLanguages;
@ -212,6 +220,10 @@ begin
ccbPreviewOptions.Items[4] := RSPageMarginsButtons;
ccbPreviewOptions.Items[5] := RSHeaderFooterButton;
ccbPreviewOptions.Items[6] := RSPrintOrderButtons;
ccbPreviewOptions.Items[7] := RSCenterButtons;
ccbPreviewOptions.Items[8] := RSPageSetupButton;
ccbPreviewOptions.Items[9] := RSPageNumberInfoPanel;
ccbPreviewOptions.Items[10] := RSZoomLevelInfoPanel;
ccbPreviewOptions.ItemIndex := idx2;
end;