RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TControlBar.OnPaint Event

Occurs when the control bar is painted.

Pascal
property OnPaint: TNotifyEvent;
C++
__property TNotifyEvent OnPaint;

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. 

 

onbandpaint 

Canvas 

ClientRect 

picture

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!