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

# TCustomLabel.Paint

Performs actions needed to draw the control on its Canvas.

## Declaration

Source position: stdctrls.pp line 1610

`public procedure TCustomLabel.Paint; override;`

## Description

Paint is an overridden method in TCustomLabel used to draw the control on its Canvas. Paint ensures that property values in the control are applied to the Canvas before measuring and drawing its Text, including:

- AutoSize
- Alignment
- Layout
- WordWrap
- Transparent
- Color
- Font
- ShowAccel
- Enabled
- Alignment
- UseRightToLeftAlignment
- UseRightToLeftReading

DoDrawText is called to render the label text using the DrawText flags needed for the property values.

Remark: | Paint does not call the inherited method in TGraphicControl. As a result, it does not signal the OnPaint event handler in the ancestor class.

## See also

TCustomLabel.GetLabelText |  | Returns the string value in the Caption for the control.
TControl.Caption |  | The text displayed for the control.
TGraphicControl.Canvas |  | A clipped window into the parent Canvas.
TGraphicControl.Paint |  | Implements the default handler used to draw the control.
TGraphicControl.OnPaint |  | Event handler signalled to paint the control.