Move creation of tablecomment from application startup to a place where it's done on demand.

This commit is contained in:
Ansgar Becker
2007-07-03 19:17:54 +00:00
parent 45d617c776
commit 3e2517ee6f
6 changed files with 19 additions and 6 deletions

View File

@ -30,8 +30,7 @@ type
{ Public declarations }
end;
var
tablecomment: Ttablecomment;
function tablecommentWindow(AOwner: TComponent): Boolean;
implementation
@ -39,6 +38,21 @@ uses Childwin, helpers, Main;
{$R *.DFM}
{**
Create form on demand
@param TComponent Owner of form (should be calling form)
@return Boolean Form closed using modalresult mrOK
}
function tablecommentWindow(AOwner: TComponent): Boolean;
var
f : Ttablecomment;
begin
f := Ttablecomment.Create(AOwner);
Result := (f.ShowModal=mrOK);
FreeAndNil(f);
end;
procedure Ttablecomment.ButtonCancelClick(Sender: TObject);
begin
close;