git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2408 8e941d3f-bd1b-0410-a28a-d453659cc2b4

This commit is contained in:
dopi
2012-04-25 14:26:34 +00:00
parent 8a7eabb7e2
commit caaed89c99
7 changed files with 463 additions and 379 deletions

View File

@@ -86,6 +86,9 @@
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<UseHeaptrc Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>

View File

@@ -7,13 +7,20 @@ uses
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, uMainForm, uForm2
Forms, uMainForm, uForm2, sysutils
{ you can add units after this };
{$R *.res}
var
HeapTraceFile : String ;
begin
RequireDerivedFormResource := True;
HeapTraceFile := ExtractFilePath(ParamStr(0))+ 'heaptrclog.trc' ;
DeleteFile( HeapTraceFile );
SetHeapTraceOutput( HeapTraceFile );
RequireDerivedFormResource := True;
Application.Initialize;
Application.CreateForm(TfMainForm, fMainForm) ;
Application.CreateForm(TForm2, Form2) ;

File diff suppressed because it is too large Load Diff

View File

@@ -20,9 +20,9 @@ object Form1: TForm1
LCLVersion = '1.1'
object bClose: TButton
Left = 392
Height = 27
Height = 25
Top = 216
Width = 70
Width = 86
AutoSize = True
Caption = 'Close Form'
OnClick = bCloseClick
@@ -30,7 +30,7 @@ object Form1: TForm1
end
object Edit1: TEdit
Left = 24
Height = 25
Height = 23
Top = 62
Width = 82
TabOrder = 0
@@ -38,11 +38,12 @@ object Form1: TForm1
end
object Edit2: TEdit
Left = 24
Height = 25
Height = 23
Top = 104
Width = 82
OnExit = Edit2Exit
TabOrder = 1
Text = 'e'
end
object Label1: TLabel
Left = 144
@@ -54,10 +55,10 @@ object Form1: TForm1
object Label2: TLabel
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
Left = 74
Height = 39
Left = 98
Height = 31
Top = 16
Width = 353
Width = 305
Alignment = taCenter
Caption = 'This Form has Max Constraints.'#13#10'It will be centralized on Tab Sheet if it is smaller than it'
Font.Style = [fsBold]
@@ -68,9 +69,9 @@ object Form1: TForm1
AnchorSideTop.Control = bClose
AnchorSideTop.Side = asrCenter
Left = 32
Height = 52
Top = 203
Width = 323
Height = 46
Top = 205
Width = 324
Caption = 'You can Close or Hide your Forms the same way you used to.'#13#10'No Special method is necessary. TDINotebook will detect by '#13#10'internal Notification and Close the Tab Sheet'
ParentColor = False
end
@@ -78,9 +79,9 @@ object Form1: TForm1
AnchorSideLeft.Control = bClose
AnchorSideLeft.Side = asrCenter
Left = 394
Height = 27
Height = 25
Top = 159
Width = 66
Width = 82
AutoSize = True
Caption = 'Hide Form'
OnClick = bHideClick
@@ -90,9 +91,9 @@ object Form1: TForm1
AnchorSideTop.Control = bHide
AnchorSideTop.Side = asrCenter
Left = 16
Height = 18
Height = 16
Top = 163
Width = 409
Width = 364
Caption = 'But, If you Hide the Form, is better you have a way to Show it again :)'
Font.Color = clRed
ParentColor = False
@@ -104,7 +105,7 @@ object Form1: TForm1
AnchorSideTop.Side = asrCenter
Left = 120
Height = 16
Top = 66
Top = 65
Width = 106
Caption = 'This is a regular Edit'
ParentColor = False
@@ -113,9 +114,9 @@ object Form1: TForm1
AnchorSideTop.Control = Edit2
AnchorSideTop.Side = asrCenter
Left = 120
Height = 52
Top = 90
Width = 344
Height = 46
Top = 92
Width = 347
Caption = 'This Edit has a OnExit Validation, who doesn''t allow Page Change'#13#10' if this Edit is empty, and the focus is on it... '#13#10'This can be disabled changing the property "VerifyIfCanChange"'
ParentColor = False
end
@@ -124,10 +125,10 @@ object Form1: TForm1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = bClose
Left = 371
Left = 379
Height = 16
Top = 194
Width = 113
Width = 112
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 6
Caption = 'This Form use caFree'
@@ -137,10 +138,10 @@ object Form1: TForm1
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Side = asrCenter
Left = 33
Left = 35
Height = 16
Top = 264
Width = 434
Width = 431
Caption = 'This Form demonstrate that TDINotebook respects your OnCloseQuery Validation'
ParentColor = False
end

View File

@@ -165,6 +165,18 @@ object fMainForm: TfMainForm
TabOrder = 2
Value = 1
end
object Button1: TButton
AnchorSideTop.Control = pBottom
AnchorSideTop.Side = asrCenter
Left = 304
Height = 25
Top = 13
Width = 85
AutoSize = True
Caption = 'Free Form2'
OnClick = Button1Click
TabOrder = 3
end
end
object mEvents: TMemo
Left = 584

View File

@@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
ComCtrls, Buttons, StdCtrls, ExtCtrls, Spin, TDIClass , types, IpHtml;
ComCtrls, Buttons, StdCtrls, ExtCtrls, Spin, TDIClass, IpHtml;
type
@@ -14,6 +14,7 @@ type
TfMainForm = class(TForm)
bToggleLog : TButton ;
Button1 : TButton ;
cbxBackgroundCorner : TComboBox ;
Image1 : TImage ;
ImageList1 : TImageList ;
@@ -36,6 +37,7 @@ type
tsFixed : TTabSheet ;
TDINoteBook1 : TTDINoteBook ;
procedure bToggleLogClick(Sender : TObject) ;
procedure Button1Click(Sender : TObject) ;
procedure cbxBackgroundCornerChange(Sender : TObject) ;
procedure FormClose(Sender : TObject ; var CloseAction : TCloseAction) ;
procedure FormCloseQuery(Sender : TObject ; var CanClose : boolean) ;
@@ -91,6 +93,8 @@ end;
procedure TfMainForm.MenuItem3Click(Sender : TObject) ;
begin
if not Assigned( Form2 ) then
Form2 := TForm2.Create(Self);
Form2.Show;
end;
@@ -109,6 +113,12 @@ begin
bToggleLog.Caption := '< Show Log' ;
end;
procedure TfMainForm.Button1Click(Sender : TObject) ;
begin
Form2.Free;
Form2 := nil;
end;
procedure TfMainForm.FormClose(Sender : TObject ; var CloseAction : TCloseAction
) ;
begin
@@ -133,7 +143,9 @@ end;
procedure TfMainForm.miForm2Click(Sender : TObject) ;
begin
TDINoteBook1.ShowFormInNewPage( Form2, 4 );
if not Assigned( Form2 ) then
Form2 := TForm2.Create(Self);
TDINoteBook1.ShowFormInPage( Form2, 4 );
end;
procedure TfMainForm.seFixedPagesChange(Sender : TObject) ;