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

# TCustomControl.Paint

Implements the default handler used to draw the control.

## Declaration

Source position: controls.pp line 2479

`protected procedure TCustomControl.Paint; virtual;`

## Description

Paint is a method which causes the control to be drawn using the drawing mechanism for the control. In TCustomControl, like TGraphicControl, the OnPaint event handler is used (when assigned). Assign a routine to the OnPaint handler to perform the drawing operations needed for the control.

Paint called from the PaintWindow method, and occurs when a LM_PAINT message is handled for the control.

## See also

TCustomControl.OnPaint |  | Event handler signalled to paint the control.
TCustomControl.PaintWindow |  | The Paint handler plug-in, intercepting paint requests.
TCustomControl.WMPaint |  | Handles LM_PAINT messages for the control.