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

TGraphicControl.OnPaint

Event handler signalled to paint the control.

Declaration

Source position: controls.pp line 2467

protected property TGraphicControl.OnPaint : TNotifyEvent
  read FOnPaint
  write FOnPaint;

Description

OnPaint is a TNotifyEvent with the event handler signalled to paint the control. Applications must implement and assign a routine to the event handler to perform the drawing operation. TGraphicControl does not provide a default drawing mechanism.

Use the Canvas for the control to perform drawing operations. The Font and Brush in Canvas are automatically configured to use values assigned to the corresponding properties in the control. BorderStyle, however, is not automatically applied. Use the Pen in Canvas as needed to draw the BorderStyle for the control.

OnPaint is signalled (when assigned) from the Paint method.

See also

TGraphicControl.Canvas

  

A clipped window into the parent Canvas.

TGraphicControl.Paint

  

Implements the default handler used to draw the control.

TControl.Font

  

The font to be used for text display in this control.

TControl.Color

  

The background color for the control.

TWinControl.BorderStyle

  

Indicates the border style displayed around the control.


Version 3.2 Generated 2024-02-25 Home