-- TDINoteBook --

[+] Added new Option "tdiEmulateFormOnActivate". If Seted, will fire Internal Form
    OnActivate and OnDeactivate when changing Pages
    (by: DSA)
- Demo and OPM updated

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6786 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
dopi
2019-01-09 18:39:51 +00:00
parent d0105dfcd2
commit 873b9142bd
8 changed files with 163 additions and 122 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<Version Value="10"/> <Version Value="11"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<General> <General>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
@ -22,13 +22,12 @@
</BuildModes> </BuildModes>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
</PublishOptions> </PublishOptions>
<RunParams> <RunParams>
<local> <FormatVersion Value="2"/>
<FormatVersion Value="1"/> <Modes Count="1">
</local> <Mode0 Name="default"/>
</Modes>
</RunParams> </RunParams>
<RequiredPackages Count="2"> <RequiredPackages Count="2">
<Item1> <Item1>

View File

@ -2,9 +2,9 @@
<CONFIG> <CONFIG>
<ProjectSession> <ProjectSession>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Version Value="10"/> <Version Value="11"/>
<BuildModes Active="Default"/> <BuildModes Active="Default"/>
<Units Count="77"> <Units Count="79">
<Unit0> <Unit0>
<Filename Value="TDIDemo.lpr"/> <Filename Value="TDIDemo.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -29,8 +29,8 @@
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="uForm1"/> <UnitName Value="uForm1"/>
<EditorIndex Value="1"/> <EditorIndex Value="1"/>
<TopLine Value="92"/> <TopLine Value="73"/>
<CursorPos X="107" Y="107"/> <CursorPos X="74" Y="92"/>
<UsageCount Value="209"/> <UsageCount Value="209"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
@ -45,7 +45,7 @@
<EditorIndex Value="2"/> <EditorIndex Value="2"/>
<TopLine Value="26"/> <TopLine Value="26"/>
<CursorPos X="19" Y="86"/> <CursorPos X="19" Y="86"/>
<UsageCount Value="176"/> <UsageCount Value="179"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
</Unit3> </Unit3>
@ -55,8 +55,9 @@
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="uMainForm"/> <UnitName Value="uMainForm"/>
<TopLine Value="17"/> <IsVisibleTab Value="True"/>
<CursorPos X="72" Y="37"/> <TopLine Value="91"/>
<CursorPos X="112" Y="105"/>
<UsageCount Value="101"/> <UsageCount Value="101"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<LoadedDesigner Value="True"/> <LoadedDesigner Value="True"/>
@ -65,8 +66,8 @@
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<UnitName Value="TDIClass"/> <UnitName Value="TDIClass"/>
<EditorIndex Value="3"/> <EditorIndex Value="3"/>
<TopLine Value="1181"/> <TopLine Value="1046"/>
<CursorPos X="35" Y="1185"/> <CursorPos X="38" Y="1060"/>
<UsageCount Value="101"/> <UsageCount Value="101"/>
<Bookmarks Count="7"> <Bookmarks Count="7">
<Item0 Y="348" ID="2"/> <Item0 Y="348" ID="2"/>
@ -74,18 +75,17 @@
<Item2 X="3" Y="282" ID="6"/> <Item2 X="3" Y="282" ID="6"/>
<Item3 X="3" Y="362" ID="5"/> <Item3 X="3" Y="362" ID="5"/>
<Item4 X="17" Y="311" ID="7"/> <Item4 X="17" Y="311" ID="7"/>
<Item5 X="5" Y="1067" ID="1"/> <Item5 X="7" Y="1067" ID="1"/>
<Item6 X="40" Y="892" ID="3"/> <Item6 X="40" Y="892" ID="3"/>
</Bookmarks> </Bookmarks>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit5> </Unit5>
<Unit6> <Unit6>
<Filename Value="C:\lazarus\lcl\include\customnotebook.inc"/> <Filename Value="C:\lazarus\lcl\include\customnotebook.inc"/>
<EditorIndex Value="5"/> <EditorIndex Value="-1"/>
<TopLine Value="824"/> <TopLine Value="824"/>
<CursorPos X="3" Y="829"/> <CursorPos X="3" Y="829"/>
<UsageCount Value="41"/> <UsageCount Value="42"/>
<Loaded Value="True"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
<Filename Value="C:\lazarus\lcl\include\control.inc"/> <Filename Value="C:\lazarus\lcl\include\control.inc"/>
@ -137,11 +137,10 @@
<Unit13> <Unit13>
<Filename Value="C:\lazarus\lcl\controls.pp"/> <Filename Value="C:\lazarus\lcl\controls.pp"/>
<UnitName Value="Controls"/> <UnitName Value="Controls"/>
<EditorIndex Value="7"/> <EditorIndex Value="-1"/>
<TopLine Value="1598"/> <TopLine Value="1598"/>
<CursorPos X="14" Y="1610"/> <CursorPos X="14" Y="1610"/>
<UsageCount Value="22"/> <UsageCount Value="23"/>
<Loaded Value="True"/>
</Unit13> </Unit13>
<Unit14> <Unit14>
<Filename Value="C:\lazarus\components\lazcontrols\extendednotebook.pas"/> <Filename Value="C:\lazarus\components\lazcontrols\extendednotebook.pas"/>
@ -153,11 +152,10 @@
<Unit15> <Unit15>
<Filename Value="C:\lazarus\lcl\comctrls.pp"/> <Filename Value="C:\lazarus\lcl\comctrls.pp"/>
<UnitName Value="ComCtrls"/> <UnitName Value="ComCtrls"/>
<EditorIndex Value="4"/> <EditorIndex Value="-1"/>
<TopLine Value="481"/> <TopLine Value="648"/>
<CursorPos X="14" Y="497"/> <CursorPos X="14" Y="667"/>
<UsageCount Value="41"/> <UsageCount Value="41"/>
<Loaded Value="True"/>
</Unit15> </Unit15>
<Unit16> <Unit16>
<Filename Value="C:\lazarus\lcl\include\pagecontrol.inc"/> <Filename Value="C:\lazarus\lcl\include\pagecontrol.inc"/>
@ -326,11 +324,10 @@
<Unit41> <Unit41>
<Filename Value="C:\lazarus\lcl\forms.pp"/> <Filename Value="C:\lazarus\lcl\forms.pp"/>
<UnitName Value="Forms"/> <UnitName Value="Forms"/>
<EditorIndex Value="6"/> <EditorIndex Value="-1"/>
<TopLine Value="623"/> <TopLine Value="623"/>
<CursorPos X="14" Y="634"/> <CursorPos X="14" Y="634"/>
<UsageCount Value="43"/> <UsageCount Value="44"/>
<Loaded Value="True"/>
</Unit41> </Unit41>
<Unit42> <Unit42>
<Filename Value="C:\lazarus\lcl\lclmessageglue.pas"/> <Filename Value="C:\lazarus\lcl\lclmessageglue.pas"/>
@ -498,10 +495,10 @@
</Unit67> </Unit67>
<Unit68> <Unit68>
<Filename Value="..\read-me.txt"/> <Filename Value="..\read-me.txt"/>
<EditorIndex Value="8"/> <EditorIndex Value="6"/>
<TopLine Value="162"/> <TopLine Value="151"/>
<CursorPos X="56" Y="184"/> <CursorPos X="64" Y="173"/>
<UsageCount Value="43"/> <UsageCount Value="45"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="None"/> <DefaultSyntaxHighlighter Value="None"/>
</Unit68> </Unit68>
@ -546,11 +543,10 @@
</Unit74> </Unit74>
<Unit75> <Unit75>
<Filename Value="..\..\..\..\..\..\Comp\ACBr\trunk2\Fontes\ACBrComum\ACBrUtil.pas"/> <Filename Value="..\..\..\..\..\..\Comp\ACBr\trunk2\Fontes\ACBrComum\ACBrUtil.pas"/>
<IsVisibleTab Value="True"/> <EditorIndex Value="7"/>
<EditorIndex Value="9"/>
<TopLine Value="3067"/> <TopLine Value="3067"/>
<CursorPos X="32" Y="3081"/> <CursorPos X="32" Y="3081"/>
<UsageCount Value="21"/> <UsageCount Value="23"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit75> </Unit75>
<Unit76> <Unit76>
@ -561,125 +557,145 @@
<CursorPos X="78" Y="1181"/> <CursorPos X="78" Y="1181"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit76> </Unit76>
<Unit77>
<Filename Value="C:\lazarus\lcl\lclversion.pas"/>
<UnitName Value="LCLVersion"/>
<EditorIndex Value="4"/>
<TopLine Value="23"/>
<CursorPos X="17" Y="40"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit77>
<Unit78>
<Filename Value="C:\lazarus\components\lazutils\lazversion.pas"/>
<UnitName Value="LazVersion"/>
<EditorIndex Value="5"/>
<CursorPos X="3" Y="23"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit78>
</Units> </Units>
<JumpHistory Count="29" HistoryIndex="28"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1153" Column="49" TopLine="1133"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1154" Column="7" TopLine="1134"/> <Caret Line="164" Column="36" TopLine="134"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1155" TopLine="1134"/> <Caret Line="470" Column="27" TopLine="439"/>
</Position3> </Position3>
<Position4> <Position4>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1163" TopLine="1136"/> <Caret Line="493" Column="27" TopLine="462"/>
</Position4> </Position4>
<Position5> <Position5>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1155" TopLine="1136"/> <Caret Line="898" Column="49" TopLine="871"/>
</Position5> </Position5>
<Position6> <Position6>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1160" TopLine="1136"/>
</Position6> </Position6>
<Position7> <Position7>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1161" TopLine="1136"/> <Caret Line="110" Column="40" TopLine="79"/>
</Position7> </Position7>
<Position8> <Position8>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1150" Column="28" TopLine="1136"/> <Caret Line="195" Column="40" TopLine="165"/>
</Position8> </Position8>
<Position9> <Position9>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1159" TopLine="1137"/> <Caret Line="286" Column="45" TopLine="264"/>
</Position9> </Position9>
<Position10> <Position10>
<Filename Value="..\..\..\..\..\..\Comp\ACBr\trunk2\Fontes\ACBrComum\ACBrUtil.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="19" Column="102"/>
</Position10> </Position10>
<Position11> <Position11>
<Filename Value="..\read-me.txt"/> <Filename Value="..\tdiclass.pas"/>
<Caret Column="40"/> <Caret Line="110" Column="40" TopLine="79"/>
</Position11> </Position11>
<Position12> <Position12>
<Filename Value="..\read-me.txt"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="30" Column="78"/> <Caret Line="195" Column="40" TopLine="165"/>
</Position12> </Position12>
<Position13> <Position13>
<Filename Value="..\read-me.txt"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="35" Column="38" TopLine="5"/> <Caret Line="286" Column="45" TopLine="255"/>
</Position13> </Position13>
<Position14> <Position14>
<Filename Value="..\read-me.txt"/> <Filename Value="..\tdiclass.pas"/>
<Caret Column="5"/> <Caret Line="898" Column="49" TopLine="867"/>
</Position14> </Position14>
<Position15> <Position15>
<Filename Value="..\read-me.txt"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="27" Column="58"/> <Caret Line="1021" Column="55" TopLine="990"/>
</Position15> </Position15>
<Position16> <Position16>
<Filename Value="..\read-me.txt"/> <Filename Value="..\read-me.txt"/>
<Caret Line="31" Column="5"/> <Caret Line="156" Column="42" TopLine="150"/>
</Position16> </Position16>
<Position17> <Position17>
<Filename Value="..\read-me.txt"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="46" Column="5" TopLine="16"/> <Caret Line="1090" Column="25" TopLine="1079"/>
</Position17> </Position17>
<Position18> <Position18>
<Filename Value="..\read-me.txt"/> <Filename Value="umainform.pas"/>
<Caret Line="64" Column="7" TopLine="34"/> <Caret Line="167" Column="26" TopLine="157"/>
</Position18> </Position18>
<Position19> <Position19>
<Filename Value="..\read-me.txt"/> <Filename Value="umainform.pas"/>
<Caret Line="68" Column="42" TopLine="38"/> <Caret Line="174" Column="26" TopLine="164"/>
</Position19> </Position19>
<Position20> <Position20>
<Filename Value="..\read-me.txt"/> <Filename Value="umainform.pas"/>
<Caret Line="71" Column="13" TopLine="41"/> <Caret Line="112" Column="51" TopLine="107"/>
</Position20> </Position20>
<Position21> <Position21>
<Filename Value="..\tdiclass.pas"/> <Filename Value="umainform.pas"/>
<Caret Line="1028" Column="29" TopLine="1021"/> <Caret Line="109" Column="48" TopLine="91"/>
</Position21> </Position21>
<Position22> <Position22>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="53" Column="16" TopLine="40"/> <Caret Line="1100" Column="38" TopLine="1079"/>
</Position22> </Position22>
<Position23> <Position23>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="57" Column="51" TopLine="40"/> <Caret Line="1099" Column="38" TopLine="1079"/>
</Position23> </Position23>
<Position24> <Position24>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1185" TopLine="1164"/>
</Position24> </Position24>
<Position25> <Position25>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1186" TopLine="1165"/> <Caret Line="1067" Column="8" TopLine="1042"/>
</Position25> </Position25>
<Position26> <Position26>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1188" TopLine="1167"/> <Caret Line="1058" Column="18" TopLine="1046"/>
</Position26> </Position26>
<Position27> <Position27>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1185" TopLine="1167"/>
</Position27> </Position27>
<Position28> <Position28>
<Filename Value="..\tdiclass.pas"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="1186" TopLine="1167"/> <Caret Line="169" Column="23" TopLine="148"/>
</Position28> </Position28>
<Position29> <Position29>
<Filename Value="..\read-me.txt"/> <Filename Value="..\tdiclass.pas"/>
<Caret Line="58" Column="50" TopLine="133"/> <Caret Line="173" Column="23" TopLine="148"/>
</Position29> </Position29>
<Position30>
<Filename Value="..\tdiclass.pas"/>
<Caret Line="606" Column="21" TopLine="585"/>
</Position30>
</JumpHistory> </JumpHistory>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="0" ActiveMode="default"/>
</RunParams>
</ProjectSession> </ProjectSession>
<Debugging> <Debugging>
<BreakPoints Count="1"> <BreakPoints Count="1">
@ -688,7 +704,7 @@
<WatchScope Value="wpsLocal"/> <WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/> <WatchKind Value="wpkWrite"/>
<Source Value="..\tdiclass.pas"/> <Source Value="..\tdiclass.pas"/>
<Line Value="1185"/> <Line Value="1186"/>
</Item1> </Item1>
</BreakPoints> </BreakPoints>
</Debugging> </Debugging>

Binary file not shown.

View File

@ -12,7 +12,7 @@ object fMainForm: TfMainForm
OnCloseQuery = FormCloseQuery OnCloseQuery = FormCloseQuery
OnCreate = FormCreate OnCreate = FormCreate
OnKeyDown = FormKeyDown OnKeyDown = FormKeyDown
LCLVersion = '1.1' LCLVersion = '2.0.0.2'
object StatusBar1: TStatusBar object StatusBar1: TStatusBar
Left = 0 Left = 0
Height = 23 Height = 23
@ -77,7 +77,7 @@ object fMainForm: TfMainForm
Left = 164 Left = 164
Height = 30 Height = 30
Top = 312 Top = 312
Width = 243 Width = 242
Alignment = taCenter Alignment = taCenter
Caption = 'This is a Fixed Page, and cannot be closed.'#13#10'You can configure it on "FixedPages" Property' Caption = 'This is a Fixed Page, and cannot be closed.'#13#10'You can configure it on "FixedPages" Property'
ParentColor = False ParentColor = False
@ -173,6 +173,15 @@ object fMainForm: TfMainForm
OnClick = Button1Click OnClick = Button1Click
TabOrder = 3 TabOrder = 3
end end
object chEmulateFormOnActive: TCheckBox
Left = 412
Height = 19
Top = 16
Width = 146
Caption = 'Emulate Form OnActive'
OnChange = chEmulateFormOnActiveChange
TabOrder = 4
end
end end
object mEvents: TMemo object mEvents: TMemo
Left = 584 Left = 584

View File

@ -16,6 +16,7 @@ type
bToggleLog : TButton ; bToggleLog : TButton ;
Button1 : TButton ; Button1 : TButton ;
cbxBackgroundCorner : TComboBox ; cbxBackgroundCorner : TComboBox ;
chEmulateFormOnActive: TCheckBox;
Image1 : TImage ; Image1 : TImage ;
ImageList1 : TImageList ; ImageList1 : TImageList ;
Label1 : TLabel ; Label1 : TLabel ;
@ -39,6 +40,7 @@ type
procedure bToggleLogClick(Sender : TObject) ; procedure bToggleLogClick(Sender : TObject) ;
procedure Button1Click(Sender : TObject) ; procedure Button1Click(Sender : TObject) ;
procedure cbxBackgroundCornerChange(Sender : TObject) ; procedure cbxBackgroundCornerChange(Sender : TObject) ;
procedure chEmulateFormOnActiveChange(Sender: TObject);
procedure FormClose(Sender : TObject ; var CloseAction : TCloseAction) ; procedure FormClose(Sender : TObject ; var CloseAction : TCloseAction) ;
procedure FormCloseQuery(Sender : TObject ; var CanClose : boolean) ; procedure FormCloseQuery(Sender : TObject ; var CanClose : boolean) ;
procedure FormCreate(Sender : TObject) ; procedure FormCreate(Sender : TObject) ;
@ -102,6 +104,14 @@ begin
TDINoteBook1.BackgroundCorner := TTDIBackgroundCorner( cbxBackgroundCorner.ItemIndex ); TDINoteBook1.BackgroundCorner := TTDIBackgroundCorner( cbxBackgroundCorner.ItemIndex );
end; end;
procedure TfMainForm.chEmulateFormOnActiveChange(Sender: TObject);
begin
if chEmulateFormOnActive.Checked then
TDINoteBook1.TDIOptions := TDINoteBook1.TDIOptions + [tdiEmulateFormOnActivate]
else
TDINoteBook1.TDIOptions := TDINoteBook1.TDIOptions - [tdiEmulateFormOnActivate];
end;
procedure TfMainForm.bToggleLogClick(Sender : TObject) ; procedure TfMainForm.bToggleLogClick(Sender : TObject) ;
begin begin
mEvents.Visible := not mEvents.Visible ; mEvents.Visible := not mEvents.Visible ;

Binary file not shown.

View File

@ -162,13 +162,19 @@ to explain the component
[*]: Resource modified / improved [*]: Resource modified / improved
[-]: Bug Fix (hopefully) [-]: Bug Fix (hopefully)
13/07/2013 09/01/2019
[+] Added suport to runs Internal Form OnActivate and OnDeactivate when [+] Added new Option "tdiEmulateFormOnActivate". If Seted, will fire Internal Form
changing Pages (by: DSA) OnActivate and OnDeactivate when changing Pages
(by: DSA)
14/11/2013 07/01/2018
[-] Better detection for Form Constraint handling on Linux [-] Fix compilation for Lazarus 1.9.0 (by: DSA)
(by: DSA and Gall� G�bor)
03/10/2017
[-] Fix for Closed Buttom Enabled/Disabled detection when Creating and Closing Pages
Lazarus 1.6. (side effect for commit in 27/09/17)
[+] Added Public method: procedure CloseAllTabs;
(by: DSA)
27/09/2017 27/09/2017
[-] Fix for Method "RestoreLastFocusedControl". Wrong last focused component [-] Fix for Method "RestoreLastFocusedControl". Wrong last focused component
@ -177,11 +183,11 @@ to explain the component
Lazarus 1.8 Lazarus 1.8
(by: DSA) (by: DSA)
03/10/2017 14/11/2013
[-] Fix for Closed Buttom Enabled/Disabled detection when Creating and Closing Pages [-] Better detection for Form Constraint handling on Linux
Lazarus 1.6. (side effect for commit in 27/09/17) (by: DSA and Gall� G�bor)
[+] Added Public method: procedure CloseAllTabs;
(by: DSA) 13/07/2013
[+] Added suport to runs Internal Form OnActivate and OnDeactivate when
changing Pages (by: DSA)
07/01/2018
[-] Fix compilation for Lazarus 1.9.0 (by: DSA)

View File

@ -115,7 +115,7 @@ type
TTDIOption = ( tdiMiddleButtomClosePage, tdiRestoreLastActiveControl, TTDIOption = ( tdiMiddleButtomClosePage, tdiRestoreLastActiveControl,
tdiVerifyIfCanChangePage ) ; tdiVerifyIfCanChangePage, tdiEmulateFormOnActivate ) ;
TTDIOptions = set of TTDIOption ; TTDIOptions = set of TTDIOption ;
{ TTDINoteBook } { TTDINoteBook }
@ -1055,29 +1055,29 @@ begin
end ; end ;
end ; end ;
Result := Result {$if (lcl_major > 0) or (lcl_release > 30)}
{$if (lcl_major > 0) or (lcl_release > 30)} Result := Result and (inherited CanChange)
and (inherited CanChange) {$endif};
{$endif};
// Emulate FormInPage.OnDeactivate // // Emulate FormInPage.OnDeactivate //
(* if Result and (tdiRestoreLastActiveControl in FTDIOptions) then
if Result and (not FIsRemovingAPage) and
([csDesigning, csDestroying, csFreeNotification] * ComponentState = []) then
begin begin
if (ActivePage is TTDIPage) then if (not FIsRemovingAPage) and
([csDesigning, csDestroying, csFreeNotification] * ComponentState = []) then
begin begin
with TTDIPage(ActivePage) do if (ActivePage is TTDIPage) then
begin begin
if Assigned( FormInPage ) then with TTDIPage(ActivePage) do
if ([csDesigning, csDestroying, csFreeNotification] * FormInPage.ComponentState = []) then begin
if Assigned( FormInPage.OnDeactivate ) then if Assigned( FormInPage ) then
if FormInPage.Visible then if ([csDesigning, csDestroying, csFreeNotification] * FormInPage.ComponentState = []) then
FormInPage.OnDeactivate( Self ); if Assigned( FormInPage.OnDeactivate ) then
if FormInPage.Visible then
FormInPage.OnDeactivate( Self );
end ;
end ; end ;
end ; end ;
end ; end;
*)
end ; end ;
procedure TTDINoteBook.DoChange ; procedure TTDINoteBook.DoChange ;
@ -1087,19 +1087,20 @@ begin
if ([csDesigning, csDestroying, csFreeNotification] * ComponentState <> []) then exit ; if ([csDesigning, csDestroying, csFreeNotification] * ComponentState <> []) then exit ;
// Emulate FormInPage.OnActivate // // Emulate FormInPage.OnActivate //
(* if tdiRestoreLastActiveControl in FTDIOptions then
if (not FIsRemovingAPage) and (ActivePage is TTDIPage) then
begin begin
with TTDIPage(ActivePage) do if (not FIsRemovingAPage) and (ActivePage is TTDIPage) then
begin begin
if Assigned( FormInPage ) then with TTDIPage(ActivePage) do
if ([csDesigning, csDestroying, csFreeNotification] * FormInPage.ComponentState = []) then begin
if Assigned( FormInPage.OnActivate ) then if Assigned( FormInPage ) then
if FormInPage.Visible then if ([csDesigning, csDestroying, csFreeNotification] * FormInPage.ComponentState = []) then
FormInPage.OnActivate( Self ); if Assigned( FormInPage.OnActivate ) then
end; if FormInPage.Visible then
end ; FormInPage.OnActivate( Self );
*) end;
end ;
end;
CheckInterface; CheckInterface;