Mega Code Archive

 
Categories / Delphi / Graphic
 

Change the color of a TToolButton

Title: 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;