From 494cf3af6e201e8215127b14e384a3b15530d3d3 Mon Sep 17 00:00:00 2001 From: dopi Date: Fri, 29 Jun 2012 22:31:49 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2468 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tdi/Demo/TDIDemo.lps | 25 +++++++++++-------------- components/tdi/tdiclass.pas | 13 ++++++------- 2 files changed, 17 insertions(+), 21 deletions(-) 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) ;