mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-01 11:59:40 +01:00
MakeSite: added painting to example form
git-svn-id: trunk@25551 -
This commit is contained in:
parent
0e43e06e7c
commit
6551de3ddd
@ -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>
|
||||
|
||||
@ -81,6 +81,9 @@
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<UseMsgFile Value="True"/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user