From d408dd3ba3c7553b58ad90d9cbad056fcb7d4e61 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sat, 27 Dec 2008 19:47:30 +0000 Subject: [PATCH] Code cosmetic: Printing list or grids doesn't make any difference now. --- source/main.pas | 18 +++++------------- source/printlist.pas | 15 --------------- 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/source/main.pas b/source/main.pas index 34ad35b3..f34416f3 100644 --- a/source/main.pas +++ b/source/main.pas @@ -1000,20 +1000,12 @@ end; procedure TMainForm.actPrintListExecute(Sender: TObject); var - page : TTabSheet; + f: TForm; begin - // print - page := ChildWin.PageControlMain.ActivePage; - if page.Name = 'SheetData' then - begin - // TODO: Print data - end - else if (page.Name = 'SheetQuery') then - begin - // TODO: Print data - end - else - printlistWindow(self); + // Print contents of a list or grid + f := TPrintlistForm.Create(Self); + f.ShowModal; + FreeAndNil(f); end; diff --git a/source/printlist.pas b/source/printlist.pas index 28c68358..e9081ae5 100644 --- a/source/printlist.pas +++ b/source/printlist.pas @@ -32,7 +32,6 @@ type { Public declarations } end; - function printlistWindow(AOwner: TComponent): Boolean; implementation @@ -40,20 +39,6 @@ uses childwin, main, helpers; {$R *.DFM} -{** - Create form on demand - @param TComponent Owner of form (should be calling form) - @return Boolean Form closed using modalresult mrOK -} -function printlistWindow(AOwner: TComponent): Boolean; -var - f : TprintlistForm; -begin - f := TprintlistForm.Create(AOwner); - Result := (f.ShowModal=mrOK); - FreeAndNil(f); -end; - procedure TprintlistForm.FormCreate(Sender: TObject); begin