diff --git a/components/tdi/Demo/TDIDemo.lpi b/components/tdi/Demo/TDIDemo.lpi index 03f555b99..2dc73d967 100644 --- a/components/tdi/Demo/TDIDemo.lpi +++ b/components/tdi/Demo/TDIDemo.lpi @@ -73,7 +73,7 @@ - + @@ -93,9 +93,6 @@ - - - diff --git a/components/tdi/Demo/TDIDemo.lpr b/components/tdi/Demo/TDIDemo.lpr index c56704619..dac2561ac 100644 --- a/components/tdi/Demo/TDIDemo.lpr +++ b/components/tdi/Demo/TDIDemo.lpr @@ -20,7 +20,6 @@ begin DeleteFile( HeapTraceFile ); SetHeapTraceOutput( HeapTraceFile ); - RequireDerivedFormResource := True; Application.Initialize; Application.CreateForm(TfMainForm, fMainForm) ; Application.CreateForm(TForm2, Form2) ; diff --git a/components/tdi/Demo/TDIDemo.lps b/components/tdi/Demo/TDIDemo.lps index 2ec759687..acf629f8d 100644 --- a/components/tdi/Demo/TDIDemo.lps +++ b/components/tdi/Demo/TDIDemo.lps @@ -4,15 +4,15 @@ - + - - - + + + @@ -23,7 +23,7 @@ - + @@ -32,13 +32,10 @@ - - - - + @@ -47,13 +44,10 @@ - - + - - - + @@ -61,23 +55,23 @@ - - - - + + + - + + - - - + + + @@ -105,12 +99,10 @@ - - - + @@ -150,26 +142,24 @@ - - + + - + - - - + @@ -183,8 +173,8 @@ - - + + @@ -361,7 +351,7 @@ - + @@ -379,7 +369,7 @@ - + @@ -424,7 +414,7 @@ - + @@ -432,7 +422,7 @@ - + @@ -683,7 +673,6 @@ - @@ -711,12 +700,10 @@ - - - + @@ -727,131 +714,107 @@ + + + + + + + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - - + + - + - + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/components/tdi/Demo/uform1.lfm b/components/tdi/Demo/uform1.lfm index 2a4dbe864..69ecd5abe 100644 --- a/components/tdi/Demo/uform1.lfm +++ b/components/tdi/Demo/uform1.lfm @@ -1,7 +1,7 @@ object Form1: TForm1 - Left = 623 + Left = 615 Height = 300 - Top = 319 + Top = 317 Width = 500 Caption = 'Form1' ClientHeight = 300 @@ -17,7 +17,7 @@ object Form1: TForm1 OnCloseQuery = FormCloseQuery OnDestroy = FormDestroy OnKeyDown = FormKeyDown - LCLVersion = '1.1' + LCLVersion = '0.9.30.4' object bClose: TButton Left = 392 Height = 25 diff --git a/components/tdi/Demo/uform2.lfm b/components/tdi/Demo/uform2.lfm index 0c18b37bb..70b0f0127 100644 --- a/components/tdi/Demo/uform2.lfm +++ b/components/tdi/Demo/uform2.lfm @@ -1,7 +1,7 @@ object Form2: TForm2 - Left = 564 + Left = 555 Height = 252 - Top = 330 + Top = 328 Width = 499 Caption = 'Form2' ClientHeight = 252 @@ -13,7 +13,7 @@ object Form2: TForm2 OnHide = FormHide OnKeyDown = FormKeyDown OnShow = FormShow - LCLVersion = '1.1' + LCLVersion = '0.9.30.4' object Edit1: TEdit Left = 48 Height = 23 diff --git a/components/tdi/Demo/umainform.lfm b/components/tdi/Demo/umainform.lfm index c64aefa65..136a3194d 100644 --- a/components/tdi/Demo/umainform.lfm +++ b/components/tdi/Demo/umainform.lfm @@ -1,7 +1,7 @@ object fMainForm: TfMainForm - Left = 428 + Left = 409 Height = 484 - Top = 154 + Top = 156 Width = 799 Caption = 'fMainForm' ClientHeight = 464 @@ -46,7 +46,7 @@ object fMainForm: TfMainForm OnChange = TDINoteBook1Change OnCloseTabClicked = TDINoteBook1CloseTabClicked OnMouseDown = TDINoteBook1MouseDown - Options = [nboShowCloseButtons, nboMultiLine, nboKeyboardTabSwitch, nboShowAddTabButton] + Options = [nboMultiLine] TabDragMode = dmAutomatic TabDragAcceptMode = dmAutomatic BackgroundImage = Image1 @@ -89,6 +89,7 @@ object fMainForm: TfMainForm Top = 0 Width = 571 Align = alTop + Anchors = [akTop, akLeft, akRight, akBottom] Lines.Strings = ( 'Memo1' ) diff --git a/components/tdi/tdiclass.pas b/components/tdi/tdiclass.pas index fa59e85ff..fe2121339 100644 --- a/components/tdi/tdiclass.pas +++ b/components/tdi/tdiclass.pas @@ -33,7 +33,7 @@ interface uses Classes, SysUtils, Forms, Controls, ComCtrls, ExtCtrls, Menus, - ExtendedNotebook, Buttons, Graphics, LMessages ; + ExtendedNotebook, Buttons, Graphics, LMessages, LCLVersion ; const TDIM_CLOSEPAGE = LM_INTERFACELAST + 500; @@ -165,10 +165,12 @@ type procedure RemoveInvalidPages ; protected - function CanChange: Boolean; override; + function CanChange: Boolean; + {$if (lcl_major > 0) or (lcl_release > 30)} override; {$endif} procedure DoChange; override; procedure Loaded; override; - procedure RemovePage(Index: Integer); override; + procedure RemovePage(Index: Integer); + {$if (lcl_major > 0) or (lcl_release > 30)} override; {$endif} procedure msg_ClosePage(var Msg: TLMessage); message TDIM_CLOSEPAGE; @@ -587,7 +589,11 @@ begin end ; FTabsMenuItem.Add(NewMenuItem); - if (nboKeyboardTabSwitch in Options) then + if {$if (lcl_major > 0) or (lcl_release > 30)} + (nboKeyboardTabSwitch in Options) + {$else} + True + {$endif} then begin FNextMenuItem := TMenuItem.Create( FTabsMenuItem ); with FNextMenuItem do @@ -808,7 +814,7 @@ begin CreateCloseMenuItem; FCloseMenuItem.Visible := True ; - FCloseMenuItem.Enabled := ( ActivePageIndex >= FFixedPages ); + FCloseMenuItem.Enabled := ( ActivePageIndex >= FFixedPages ); end ; end ; @@ -946,7 +952,7 @@ begin with FCloseAllTabsMenuItem do begin - Enabled := (PageCount > 0); + Enabled := (PageCount > FFixedPages); Caption := TDIActions.CloseAllTabs.Caption; Visible := TDIActions.CloseAllTabs.Visible; ImageIndex := TDIActions.CloseAllTabs.ImageIndex; @@ -1024,7 +1030,10 @@ begin end ; end ; - Result := Result and (inherited CanChange) ; + Result := Result + {$if (lcl_major > 0) or (lcl_release > 30)} + and (inherited CanChange) + {$endif}; end ; procedure TTDINoteBook.DoChange ; @@ -1081,7 +1090,11 @@ begin if CanRemovePage then begin - inherited RemovePage(APage.PageIndex) ; + {$if (lcl_major > 0) or (lcl_release > 30)} + inherited RemovePage(APage.PageIndex) ; + {$else} + APage.Free; + {$endif} if PageCount < 1 then // On this case, DoChange is not fired // CheckInterface;