Sign in Join
FPDoc Onlineexperiment

TScrollBox.OnPaint property

Member of TScrollBoxpublishedIn unit Forms

Event handler signalled to paint the control.

Declaration

pascal
property OnPaint:;

Description

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.

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.

This description is the one of Controls.TCustomControl.OnPaint.

See also

  • Paint
  • Canvas
  • Font
  • Color
  • BorderStyle

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.