[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Event handler signalled to paint the control.
Source position: controls.pp line 2496
public property TCustomControl.OnPaint : TNotifyEvent |
OnPaint is a TNotifyEvent property with the event handler signalled to draw the control on its Canvas. An object procedure which draws all aspects of the control must be implemented and assigned to the property.
The Sender argument provides access to properties and methods for the control instance. It must be cast to a TCustomControl to access members for the class type.
Use Canvas to render the control in the event handler. The values from Font and Color are already applied to the corresponding properties in Canvas. The BorderStyle property must be applied in code for the handler.
OnPaint is signalled from the Paint method.
Remark: | For the macOS Carbon widgetset, drawing on the Canvas outside of the OnPaint event handler is not supported. Drawing directly to a screen device context is also not supported. |
|
Implements the default handler used to draw the control. |
|
|
The drawing surface for the control. |
|
|
The font to be used for text display in this control. |
|
|
The background color for the control. |
|
|
Indicates the border style displayed around the control. |
Version 3.2 | Generated 2024-02-25 | Home |