MakeSite: added painting to example form

git-svn-id: trunk@25551 -
This commit is contained in:
mattias 2010-05-20 19:10:03 +00:00
parent 0e43e06e7c
commit 6551de3ddd
3 changed files with 32 additions and 2 deletions

View File

@ -62,8 +62,12 @@
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)\"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
<LCLWidgetType Value="qt"/>
</SearchPaths>
<Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>

View File

@ -81,6 +81,9 @@
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>

View File

@ -30,7 +30,7 @@ Default floating sites are owned by Application,
interface
uses
Classes, SysUtils, Controls, Forms, ExtCtrls, EasyDockSite,
Classes, SysUtils, Controls, Forms, ExtCtrls, EasyDockSite, Graphics,
fFloatingSite;
type
@ -112,6 +112,29 @@ type
TWinControlAccess = class(TWinControl) end;
TControlAccess = class(TControl) end;
{ TExampleForm }
TExampleForm = class(TForm)
public
procedure Paint; override;
end;
{ TExampleForm }
procedure TExampleForm.Paint;
begin
inherited Paint;
with Canvas do begin
Pen.Color:=clRed;
MoveTo(0,0);
LineTo(ClientWidth-1,0);
LineTo(ClientWidth-1,ClientHeight-1);
LineTo(0,ClientHeight-1);
LineTo(0,0);
LineTo(ClientWidth-1,ClientHeight-1);
end;
end;
{ TDockMaster }
constructor TDockMaster.Create(AOwner: TComponent);
@ -639,7 +662,7 @@ begin
//search/create ourselves
fo := Owner; //our owner also owns the forms
if AName = '' then begin
Result := TForm.Create(fo); //named Form1, Form2... - not now???
Result := TExampleForm.Create(fo); //named Form1, Form2... - not now???
end else begin
//create new instance
//DebugLn('!!! create new: ', AName);