git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2391 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
ff6f4c52a7
commit
a4c4e60de5
@ -12,7 +12,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="36" Y="18"/>
|
||||
<UsageCount Value="84"/>
|
||||
<UsageCount Value="86"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="mainform.pas"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="10" Y="8"/>
|
||||
<UsageCount Value="84"/>
|
||||
<UsageCount Value="86"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="uform1.pas"/>
|
||||
@ -34,9 +34,9 @@
|
||||
<UnitName Value="uForm1"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="24"/>
|
||||
<CursorPos X="15" Y="35"/>
|
||||
<UsageCount Value="84"/>
|
||||
<TopLine Value="40"/>
|
||||
<CursorPos X="60" Y="67"/>
|
||||
<UsageCount Value="86"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit2>
|
||||
@ -46,27 +46,27 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="uMainForm"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="29"/>
|
||||
<CursorPos X="23" Y="36"/>
|
||||
<UsageCount Value="42"/>
|
||||
<TopLine Value="90"/>
|
||||
<CursorPos X="17" Y="105"/>
|
||||
<UsageCount Value="43"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="..\tdiclass.pas"/>
|
||||
<UnitName Value="TDIClass"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="237"/>
|
||||
<CursorPos X="18" Y="249"/>
|
||||
<UsageCount Value="42"/>
|
||||
<TopLine Value="219"/>
|
||||
<CursorPos X="51" Y="233"/>
|
||||
<UsageCount Value="43"/>
|
||||
<Bookmarks Count="3">
|
||||
<Item0 X="17" Y="728" ID="3"/>
|
||||
<Item1 X="1" Y="687" ID="1"/>
|
||||
<Item2 X="3" Y="649" ID="2"/>
|
||||
<Item1 X="3" Y="649" ID="2"/>
|
||||
<Item2 X="68" Y="227" ID="1"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
@ -99,7 +99,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="23" Y="5"/>
|
||||
<UsageCount Value="26"/>
|
||||
<UsageCount Value="27"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
@ -166,7 +166,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="17" Y="9"/>
|
||||
<UsageCount Value="39"/>
|
||||
<UsageCount Value="40"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
@ -424,7 +424,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="697"/>
|
||||
<CursorPos X="3" Y="708"/>
|
||||
<UsageCount Value="13"/>
|
||||
<UsageCount Value="14"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit48>
|
||||
<Unit49>
|
||||
@ -497,7 +497,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="132"/>
|
||||
<CursorPos X="1" Y="154"/>
|
||||
<UsageCount Value="12"/>
|
||||
<UsageCount Value="13"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit57>
|
||||
@ -526,7 +526,7 @@
|
||||
<General>
|
||||
<ActiveWindowIndexAtStart Value="0"/>
|
||||
</General>
|
||||
<JumpHistory Count="25" HistoryIndex="24">
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="..\tdiclass.pas"/>
|
||||
<Caret Line="606" Column="1" TopLine="594"/>
|
||||
@ -627,6 +627,26 @@
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="40" Column="48" TopLine="29"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="..\tdiclass.pas"/>
|
||||
<Caret Line="244" Column="27" TopLine="237"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="..\tdiclass.pas"/>
|
||||
<Caret Line="210" Column="70" TopLine="196"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="..\tdiclass.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="40"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="..\tdiclass.pas"/>
|
||||
<Caret Line="227" Column="73" TopLine="214"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="..\tdiclass.pas"/>
|
||||
<Caret Line="721" Column="17" TopLine="706"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
||||
|
@ -48,8 +48,8 @@ procedure TForm1.Edit2Exit(Sender : TObject) ;
|
||||
begin
|
||||
if Edit2.Text = '' then
|
||||
begin
|
||||
Label1.Caption := 'Edit2 cant be empty';
|
||||
ShowMessage( 'Edit2 cant be empty' );
|
||||
Label1.Caption := 'Edit2 cannot be empty';
|
||||
ShowMessage( 'Edit2 cannot be empty' );
|
||||
Edit2.SetFocus;
|
||||
end ;
|
||||
end;
|
||||
@ -65,7 +65,7 @@ begin
|
||||
if Edit2.Text = '' then
|
||||
begin
|
||||
CanClose := False;
|
||||
ShowMessage( 'Remember... Edit2 cant be empty' );
|
||||
ShowMessage( 'Remember... Edit2 cannot be empty' );
|
||||
Edit2.Text := 'Ok, fixed';
|
||||
end ;
|
||||
fMainForm.mEvents.Lines.Add( 'Form1.CloseQuery: '+BoolToStr(CanClose,'True','False') );
|
||||
|
@ -32,13 +32,13 @@ object fMainForm: TfMainForm
|
||||
Top = 0
|
||||
Width = 587
|
||||
TabStop = False
|
||||
ActivePage = TabSheet2
|
||||
ActivePage = TabSheet1
|
||||
Align = alClient
|
||||
Constraints.MinHeight = 300
|
||||
Constraints.MinWidth = 500
|
||||
Images = ImageList1
|
||||
MultiLine = True
|
||||
TabIndex = 1
|
||||
TabIndex = 0
|
||||
TabOrder = 1
|
||||
OnChange = TDINoteBook1Change
|
||||
Options = [nboShowCloseButtons, nboMultiLine, nboKeyboardTabSwitch, nboShowAddTabButton]
|
||||
@ -2277,8 +2277,8 @@ object fMainForm: TfMainForm
|
||||
end
|
||||
object MainMenu1: TMainMenu
|
||||
Images = ImageList1
|
||||
left = 206
|
||||
top = 69
|
||||
left = 504
|
||||
top = 400
|
||||
object MenuItem1: TMenuItem
|
||||
Caption = 'Forms'
|
||||
object miForm1: TMenuItem
|
||||
@ -2298,8 +2298,8 @@ object fMainForm: TfMainForm
|
||||
end
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
left = 320
|
||||
top = 72
|
||||
left = 416
|
||||
top = 400
|
||||
Bitmap = {
|
||||
4C69060000001000000010000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
|
@ -16,6 +16,7 @@
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Version Minor="1"/>
|
||||
<Files Count="3">
|
||||
<Item1>
|
||||
<Filename Value="tdiclass.pas"/>
|
||||
|
@ -207,8 +207,8 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
{ No LastActiveControle ? Ok, if current Screen control isn't on Tab,
|
||||
go to first Control on Tab... }
|
||||
{ No LastActiveControle ? Ok, if current Screen control isn't in TabSheet,
|
||||
go to first Control on TabSheet... }
|
||||
if not Self.ContainsControl( Screen.ActiveControl ) then
|
||||
Self.SelectNext( Self, True, True);
|
||||
end
|
||||
@ -224,7 +224,7 @@ begin
|
||||
|
||||
// Adjusting AForm Border Style and Align //
|
||||
fsFormInPage.BorderStyle := bsNone ;
|
||||
//fsFormInPage.Align := alClient ;
|
||||
//fsFormInPage.Align := alClient ; // This will be done in OnResizeTDIPage
|
||||
|
||||
// Change Form Parent to the Page //
|
||||
fsFormInPage.Parent := Self;
|
||||
@ -233,7 +233,7 @@ begin
|
||||
// Show the Form //
|
||||
fsFormInPage.Visible := True ;
|
||||
|
||||
// Saving the ActiveControl on the Form //
|
||||
// Saving the current ActiveControl in the Form //
|
||||
fsLastActiveControl := fsFormInPage.ActiveControl;
|
||||
end ;
|
||||
|
||||
@ -242,17 +242,15 @@ procedure TTDIPage.Notification(AComponent : TComponent ; Operation : TOperation
|
||||
begin
|
||||
inherited Notification(AComponent, Operation) ;
|
||||
|
||||
if (fsFormInPage <> nil) and
|
||||
(Operation = opRemove) and
|
||||
(AComponent = fsFormInPage) then
|
||||
fsFormInPage := nil;
|
||||
if (Operation = opRemove) and (AComponent = fsFormInPage) then
|
||||
fsFormInPage := nil;
|
||||
end ;
|
||||
|
||||
procedure TTDIPage.OnResizeTDIPage(Sender : TObject) ;
|
||||
begin
|
||||
if not Assigned(fsFormInPage) then exit ;
|
||||
|
||||
{ If Form has MaxConstrains and doesn't fit all the Screen, Centralize on
|
||||
{ If Form has MaxConstrains and doesn't fill all the Screen, Centralize on
|
||||
TabSheet }
|
||||
if (fsFormInPage.Width < Width) and (fsFormInPage.Height < Height) then
|
||||
begin
|
||||
@ -287,7 +285,7 @@ begin
|
||||
FTabsMenuItem := nil;
|
||||
FTDIActions := TTDIActions.Create;
|
||||
|
||||
{ This is ugly, I know... but I didn't find a best solution to restore Last
|
||||
{ This is ugly, I know... but I didn't found a best solution to restore Last
|
||||
Focused Control of TDIPage }
|
||||
FTimerRestoreLastControl := TTimer.Create(Self);
|
||||
FTimerRestoreLastControl.Enabled := False;
|
||||
@ -300,7 +298,7 @@ begin
|
||||
if Assigned( FCloseBitBtn ) then
|
||||
FCloseBitBtn.Free ;
|
||||
|
||||
{ // Don't Destroy MenuItens... They will be destroyed by MainMenu //
|
||||
{ // Don't Destroy Menu Items... They will be destroyed by MainMenu //
|
||||
|
||||
if Assigned( FCloseMenuItem ) then
|
||||
FCloseMenuItem.Free ;
|
||||
@ -345,7 +343,7 @@ begin
|
||||
if Self.Owner is TWinControl then
|
||||
FCloseBitBtn.Parent := TWinControl(Self.Owner) ;
|
||||
|
||||
// Seting Image to FCloseBitBtn //;
|
||||
// Setting Image to FCloseBitBtn //;
|
||||
if Assigned( Images ) and (FTDIActions.CloseTab.ImageIndex > -1) then
|
||||
begin
|
||||
Images.GetBitmap( FTDIActions.CloseTab.ImageIndex, FCloseBitBtn.Glyph );
|
||||
@ -441,6 +439,9 @@ procedure TTDINoteBook.SetBackgroundImage(AValue : TImage) ;
|
||||
begin
|
||||
if FBackgroundImage = AValue then Exit ;
|
||||
FBackgroundImage := AValue ;
|
||||
|
||||
if Visible then
|
||||
DrawBackgroundImage;
|
||||
end ;
|
||||
|
||||
procedure TTDINoteBook.SetBackgroundCorner(AValue : TTDIBackgroundCorner) ;
|
||||
@ -501,7 +502,7 @@ begin
|
||||
|
||||
Visible := (PageCount > 0);
|
||||
|
||||
// Checking for Close Buttom visibility //
|
||||
// Checking for Close Button visibility //
|
||||
if (FCloseTabButtom <> tbNone) then
|
||||
begin
|
||||
if Visible then
|
||||
@ -514,7 +515,7 @@ begin
|
||||
if FTabsMenuItem <> nil then
|
||||
FTabsMenuItem.Visible := Visible ;
|
||||
|
||||
// Drawing Back ground Image //
|
||||
// Drawing Background Image //
|
||||
if Visible then
|
||||
DrawBackgroundImage;
|
||||
end ;
|
||||
@ -617,7 +618,7 @@ Var
|
||||
I : Integer ;
|
||||
NewMenuItem : TMenuItem ;
|
||||
begin
|
||||
// Removing MenuItens until find Separator '-' //
|
||||
// Removing Menu Items until find Separator '-' //
|
||||
NewMenuItem := FTabsMenuItem.Items[0] ;
|
||||
while (NewMenuItem.Caption <> '-') do
|
||||
begin
|
||||
@ -626,7 +627,7 @@ begin
|
||||
NewMenuItem := FTabsMenuItem.Items[0] ;
|
||||
end ;
|
||||
|
||||
// Inserting on MenuItens existing Tabs //
|
||||
// Inserting on Menu Items for existing Tabs //
|
||||
for I := PageCount-1 downto 0 do
|
||||
begin
|
||||
NewMenuItem := TMenuItem.Create(FTabsMenuItem);
|
||||
@ -678,7 +679,7 @@ begin
|
||||
control focus. This may occurs in TWinControl.OnExit Validation }
|
||||
Self.SetFocus;
|
||||
|
||||
{ If steel on same ActiveControl, maybe Focus Control was traped on
|
||||
{ If still on same ActiveControl, maybe Focus Control was trapped on
|
||||
some OnExit Validation }
|
||||
Result := ( AWinControl <> Screen.ActiveControl );
|
||||
end ;
|
||||
@ -699,13 +700,13 @@ begin
|
||||
CheckInterface;
|
||||
|
||||
{
|
||||
// This doesn't work on Win32, Focus Control always go to first control on Page //
|
||||
// This doesn't work on Win32, Focus always go to first control on Page //
|
||||
if FRestoreActiveControl then
|
||||
if (ActivePage is TTDIPage) then
|
||||
TTDIPage( ActivePage ).RestoreLastFocusedControl;
|
||||
}
|
||||
|
||||
// This is a ulgy work around.. but it works :) //
|
||||
// This is a ugly workaround.. but it works :) //
|
||||
FTimerRestoreLastControl.Enabled := True;
|
||||
end ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user