mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-15 17:40:19 +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>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)\"/>
|
<IncludeFiles Value="$(ProjOutDir)\"/>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
|
<LCLWidgetType Value="qt"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Other>
|
<Other>
|
||||||
|
<CompilerMessages>
|
||||||
|
<UseMsgFile Value="True"/>
|
||||||
|
</CompilerMessages>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
|
|||||||
@ -81,6 +81,9 @@
|
|||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Other>
|
<Other>
|
||||||
|
<CompilerMessages>
|
||||||
|
<UseMsgFile Value="True"/>
|
||||||
|
</CompilerMessages>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
|
|||||||
@ -30,7 +30,7 @@ Default floating sites are owned by Application,
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Controls, Forms, ExtCtrls, EasyDockSite,
|
Classes, SysUtils, Controls, Forms, ExtCtrls, EasyDockSite, Graphics,
|
||||||
fFloatingSite;
|
fFloatingSite;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -112,6 +112,29 @@ type
|
|||||||
TWinControlAccess = class(TWinControl) end;
|
TWinControlAccess = class(TWinControl) end;
|
||||||
TControlAccess = class(TControl) 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 }
|
{ TDockMaster }
|
||||||
|
|
||||||
constructor TDockMaster.Create(AOwner: TComponent);
|
constructor TDockMaster.Create(AOwner: TComponent);
|
||||||
@ -639,7 +662,7 @@ begin
|
|||||||
//search/create ourselves
|
//search/create ourselves
|
||||||
fo := Owner; //our owner also owns the forms
|
fo := Owner; //our owner also owns the forms
|
||||||
if AName = '' then begin
|
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
|
end else begin
|
||||||
//create new instance
|
//create new instance
|
||||||
//DebugLn('!!! create new: ', AName);
|
//DebugLn('!!! create new: ', AName);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user