...change the color of a TToolButton?

Author: Klaus Huber

Category: Forms

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;

 

printed from
www.swissdelphicenter.ch
developers knowledge base