From RAD Studio API Documentation
Jump to: navigation, search


property OnPaint: TNotifyEvent read FOnPaint write FOnPaint;


__property OnPaint;


Type Visibility Source Unit Parent
event published
Vcl.ExtCtrls TControlBar


Occurs when the control bar is painted.

Vcl.ExtCtrls.TControlBar.OnPaint inherits from Vcl.ExtCtrls.TCustomControlBar.OnPaint. All content below this line refers to Vcl.ExtCtrls.TCustomControlBar.OnPaint.

Occurs when the control bar is painted.

Write an OnPaint event handler to change the way the control bar is rendered. When a control bar receives a Windows paint message, it first draws the background picture, if any, and then generates an OnPaint event. After the OnPaint event exits, the control bar generates an OnBandPaint event for each band, finally rendering the grabbers and frames for each band.

Use the Canvas property to draw the control bar's image. Use the ClientRect property to obtain the dimensions on which to draw.

If the custom drawing is intended to change the appearance of individual bands, use the OnBandPaint event instead.

See Also