mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 04:58:11 +02:00
fixed Set/GetPixel
git-svn-id: trunk@4267 -
This commit is contained in:
parent
1835c3deab
commit
83c3371683
@ -20,22 +20,27 @@ constructor TPaintBox.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
ControlStyle := ControlStyle + [csReplicatable];
|
||||
setbounds(0,0,105,105);
|
||||
SetInitialBounds(0,0,105,105);
|
||||
end;
|
||||
|
||||
procedure TPaintBox.Paint;
|
||||
begin
|
||||
Canvas.Font := Font;
|
||||
Canvas.Brush.Color := Color;
|
||||
if csDesigning in ComponentState then
|
||||
with Canvas do
|
||||
if csDesigning in ComponentState then begin
|
||||
Canvas.Font := Font;
|
||||
Canvas.Brush.Color := Color;
|
||||
with Canvas do
|
||||
begin
|
||||
Pen.Style := psDash;
|
||||
Brush.Style := bsClear;
|
||||
Rectangle(0, 0, Width - 1, Height - 1);
|
||||
end;
|
||||
if Assigned(FOnPaint) then
|
||||
exit;
|
||||
end;
|
||||
if Assigned(FOnPaint) then begin
|
||||
Canvas.Font := Font;
|
||||
Canvas.Brush.Color := Color;
|
||||
FOnPaint(Self);
|
||||
end;
|
||||
end;
|
||||
|
||||
// included by extctrls.pp
|
||||
|
Loading…
Reference in New Issue
Block a user