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

# TCustomHeaderControl.Paint

Draws the control to its Canvas using highlighting, drag images, and theme details.

## Declaration

Source position: comctrls.pp line 4092

`public procedure TCustomHeaderControl.Paint; override;`

## Description

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

Paint calls the inherited method on entry to signal the OnPaint event handler (when assigned). The display rectangle is updated to reflect the current Width and Height for the control.

Paint iterates over the header sections defined in the Sections property, and calls PaintSection to render each one. If all sections fit within the control display area without scrolling, theme services are used to draw the control to the control to its Canvas.

Paint handles configuring the Canvas and drawing the preview when a section drag operation is in effect.

See PaintSection for more information about the actions performed to draw an individual header section for the control.

## See also

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