Vcl.Forms.TCustomForm.OnPaint

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnPaint: TNotifyEvent read FOnPaint write FOnPaint stored IsForm;

C++

__property System::Classes::TNotifyEvent OnPaint = {read=FOnPaint, write=FOnPaint, stored=IsForm};

Properties

Type Visibility Source Unit Parent
event protected
Vcl.Forms.pas
Vcl.Forms.hpp
Vcl.Forms TCustomForm

Description

Occurs when the form is redrawn.

Use OnPaint to perform special processing when the form is redrawn. Any special painting on the form should be done in this event. OnPaint occurs before any controls on the form are painted.

To determine which portions of the form's canvas need to be repainted, use the ClipRect property of the canvas.

If you use the form's Canvas property outside the OnPaint event, it will be erased and drawn-over by the next OnPaint event.

See Also

Code Examples