diff --git a/components/tdi/Demo/TDIDemo.lps b/components/tdi/Demo/TDIDemo.lps index 75fa5a3c9..d11c8604e 100644 --- a/components/tdi/Demo/TDIDemo.lps +++ b/components/tdi/Demo/TDIDemo.lps @@ -9,12 +9,10 @@ - - @@ -66,7 +64,7 @@ - + @@ -75,17 +73,17 @@ - + - - + + - - - + + + - + @@ -99,10 +97,12 @@ + - - + + + @@ -234,9 +234,9 @@ - - - + + + @@ -412,12 +412,10 @@ - - @@ -520,12 +518,10 @@ - - @@ -698,127 +694,123 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - diff --git a/components/tdi/Demo/uform1.lfm b/components/tdi/Demo/uform1.lfm index 55003794c..2a4dbe864 100644 --- a/components/tdi/Demo/uform1.lfm +++ b/components/tdi/Demo/uform1.lfm @@ -43,7 +43,6 @@ object Form1: TForm1 Width = 82 OnExit = Edit2Exit TabOrder = 1 - Text = 'e' end object Label1: TLabel Left = 144 diff --git a/components/tdi/Demo/umainform.lfm b/components/tdi/Demo/umainform.lfm index 6eebbe47c..a50f7b61b 100644 --- a/components/tdi/Demo/umainform.lfm +++ b/components/tdi/Demo/umainform.lfm @@ -53,7 +53,7 @@ object fMainForm: TfMainForm MainMenu = MainMenu1 TDIActions.TabsMenu.Caption = 'Tabs' TDIActions.TabsMenu.ImageIndex = 0 - TDIActions.TabsMenu.Visible = False + TDIActions.TabsMenu.Visible = True TDIActions.CloseTab.Caption = 'Close Tab' TDIActions.CloseTab.ImageIndex = 1 TDIActions.CloseTab.Visible = True diff --git a/components/tdi/tdiclass.pas b/components/tdi/tdiclass.pas index 26ed6735b..b2e88e028 100644 --- a/components/tdi/tdiclass.pas +++ b/components/tdi/tdiclass.pas @@ -297,12 +297,6 @@ begin // Change Form Parent to the Page // fsFormInPage.Parent := Self; - - // Show the Form // - fsFormInPage.Visible := True ; - - // Saving the current ActiveControl in the Form // - fsLastActiveControl := fsFormInPage.ActiveControl; end ; procedure TTDIPage.Notification(AComponent : TComponent ; Operation : TOperation @@ -314,8 +308,6 @@ begin if (Operation = opRemove) and (AComponent = fsFormInPage) then begin - RestoreFormProperties; - fsFormInPage := nil; end ; end ; @@ -357,7 +349,7 @@ begin if Assigned( fsFormOldCloseEvent ) then fsFormOldCloseEvent( Sender, CloseAction ); - if (CloseAction <> caFree) and Assigned( fsFormInPage ) then + if {(CloseAction <> caFree) and} Assigned( fsFormInPage ) then RestoreFormProperties; fsFormInPage := nil; @@ -389,8 +381,8 @@ procedure TTDIPage.RestoreFormProperties ; begin if not Assigned( fsFormInPage ) then exit ; - if ([csDesigning, csDestroying] * fsFormInPage.ComponentState <> []) then - exit ; +{ if ([csDesigning, csDestroying] * fsFormInPage.ComponentState <> []) then + exit ;} fsFormInPage.Visible := False; // This prevent OnFormShow be fired fsFormInPage.Parent := fsFormOldParent; @@ -700,12 +692,20 @@ begin // Activate the new Page ActivePage := NewPage; - // First Page always need a little help for align form inside // + // Show the Form // + AForm.Visible := True ; + + // Saving the current ActiveControl in the Form // + NewPage.LastActiveControl := AForm.ActiveControl; + + // Checking Form alignment // + if (AForm.Constraints.MaxHeight <= 0) or + (AForm.Constraints.MaxWidth <= 0) then + AForm.Align := alClient; // Try to expand the Form + NewPage.CheckFormAlign ; + if PageCount = 1 then - begin - NewPage.CheckFormAlign ; CheckInterface; - end ; end ; function TTDINoteBook.FindFormInPages(AForm : TForm) : Integer ;