[lazarus] Hint for TColorButton

Martin Smat martin.smat at tiscali.cz
Fri Oct 17 12:17:35 EDT 2003


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.






More information about the Lazarus mailing list