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

# TCustomSpeedButton.Paint

Updates the state for the control, and paints it to the control Canvas.

## Declaration

Source position: buttons.pp line 385

`protected procedure TCustomSpeedButton.Paint; override;`

## Description

Paint is an overridden method in TCustomSpeedButton used to draw the control to its Canvas.

Paint calls UpdateState to ensure that the internal TButtonState for the control is updated to reflect its current condition. No additional actions are performed in the method when a bitmap has not been assigned in the Glyph property.

When a Glyph is available, additional actions are performed to draw the control to its client rectangle. MeasureDraw is called to draw the background, Glyph, and Caption using the layout and state for the control.

Paint calls the inherited method prior to exit to signal the OnPaint event handler (when assigned).

## See also

TGraphicControl.Paint |  | Implements the default handler used to draw the control.