Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-10

Hint for TColorButton

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Smat

Hi,
would it be possible to change the procedure TColorButton.Paint in file colorbutton.inc in this way:

procedure TColorButton.Paint;
var
   ARect: TRect;
begin
   with Canvas do begin
     ARect:=Bounds(0, 0, Width, Height);
     //Frame3d(ARect,FBorderWidth,bvRaised); //old
     Brush.Color:=ButtonColor;
     FillRect(ARect);
     Frame3d(ARect,FBorderWidth,bvRaised); //new
   end;
   inherited Paint;
end;

Move the line Frame3d(...) after line FillRect(...). In Windows now FillRect redraw the button frame.

Martin Smat.

Reply by email