mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-30 19:02:49 +02:00
25 lines
501 B
PHP
25 lines
501 B
PHP
{ TPaintBox }
|
|
|
|
constructor TPaintBox.Create(AOwner: TComponent);
|
|
begin
|
|
inherited Create(AOwner);
|
|
ControlStyle := ControlStyle + [csReplicatable];
|
|
Width := 105;
|
|
Height := 105;
|
|
end;
|
|
|
|
procedure TPaintBox.Paint;
|
|
begin
|
|
Canvas.Font := Font;
|
|
Canvas.Brush.Color := Color;
|
|
if csDesigning in ComponentState then
|
|
with Canvas do
|
|
begin
|
|
Pen.Style := psDash;
|
|
Brush.Style := bsClear;
|
|
Rectangle(0, 0, Width, Height);
|
|
end;
|
|
if Assigned(FOnPaint) then
|
|
FOnPaint(Self);
|
|
end;
|