Vcl.ExtCtrls.TCustomControlBar.OnPaint

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnPaint: TNotifyEvent read FOnPaint write FOnPaint;

C++

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

Properties

Type Visibility Source Unit Parent
event protected
Vcl.ExtCtrls.pas
Vcl.ExtCtrls.hpp
Vcl.ExtCtrls TCustomControlBar

Description

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