[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TToolBar.OnPaintButton

Event handler signalled to draw a button on the tool bar.

## Declaration

Source position: comctrls.pp line 2417

`published property TToolBar.OnPaintButton : TToolBarOnPaintButton read FOnPaintButton write FOnPaintButton;`

## Description

OnPaintButton is a TToolBarOnPaintButton property which contains the event handler signalled when one of the Buttons on the tool bar is drawn.

OnPaintButton is signalled (when assigned) from the Paint method in TToolButton, and is used instead of the default drawing routines for the tool button. The Sender argument contains the TToolButton instance for the event notification. It is assumed that the event handler handles all aspects of drawing the button on the tool bar using the theme element details passed as an argument.

## See also

TToolButton.Paint |  | Draws the tool bar button to the Canvas for the control.
TToolBar.Paint |  | Draws the tool bar on the Canvas for the control.
TToolBar.OnPaint |  | Event handler signalled when the Paint method is called for the control.
TToolBarOnPaintButton |  | Specifies an event handler signalled to draw a button on a tool bar with a given state.