Mega Code Archive

 
Categories / Delphi / Graphic
 

How to change the color of a TToolButton

Title: How to change the color of a TToolButton procedure TForm1.ToolBar1CustomDrawButton(Sender: TToolBar; Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean); begin // select color Sender.Canvas.Brush.Color := clAqua; // Paint selected color Sender.Canvas.Rectangle(Button.BoundsRect); end;