diff --git a/components/tdi/Demo/TDIDemo.lps b/components/tdi/Demo/TDIDemo.lps index e45e400bd..e02f30dc4 100644 --- a/components/tdi/Demo/TDIDemo.lps +++ b/components/tdi/Demo/TDIDemo.lps @@ -12,7 +12,7 @@ - + @@ -23,7 +23,7 @@ - + @@ -35,7 +35,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -58,8 +58,8 @@ - - + + @@ -69,8 +69,8 @@ - - + + @@ -159,7 +159,7 @@ - + @@ -728,7 +728,7 @@ - + @@ -825,10 +825,7 @@ - - - - + diff --git a/components/tdi/tdiclass.pas b/components/tdi/tdiclass.pas index 31bf41475..d90b11c9a 100644 --- a/components/tdi/tdiclass.pas +++ b/components/tdi/tdiclass.pas @@ -184,7 +184,8 @@ type destructor Destroy ; override; procedure DoCloseTabClicked(APage: TCustomPage); override; - procedure CreateFormInNewPage( AFormClass: TFormClass; ImageIndex : Integer = -1 ) ; + function CreateFormInNewPage( AFormClass: TFormClass; + ImageIndex : Integer = -1 ) : TForm; procedure ShowFormInPage( AForm: TForm; ImageIndex : Integer = -1 ); Function FindFormInPages( AForm: TForm): Integer ; @@ -690,14 +691,12 @@ begin FMainMenu := AValue ; end ; -procedure TTDINoteBook.CreateFormInNewPage(AFormClass : TFormClass ; - ImageIndex : Integer) ; -Var - NewForm : TForm ; +function TTDINoteBook.CreateFormInNewPage(AFormClass: TFormClass; + ImageIndex: Integer): TForm; begin - NewForm := AFormClass.Create(Application); + Result := AFormClass.Create(Application); - ShowFormInPage( NewForm, ImageIndex ); + ShowFormInPage( Result, ImageIndex ); end ; procedure TTDINoteBook.ShowFormInPage(AForm : TForm ; ImageIndex : Integer) ;