RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TToolBar.OnAdvancedCustomDraw Event

Occurs at discrete stages during the painting of the toolbar's background.

Pascal
property OnAdvancedCustomDraw: TTBAdvancedCustomDrawEvent;
C++
__property TTBAdvancedCustomDrawEvent OnAdvancedCustomDraw;

Write an OnAdvancedCustomDraw event handler to enhance or replace the automatic painting of the toolbar. Use the toolbar's Canvas property to render the toolbar's image. OnAdvancedCustomDraw is for painting the background of the toolbar. The painting of individual buttons on the toolbar should be handled in an OnCustomDrawButton or OnAdvancedCustomDrawButton event handler. 

Sender is the toolbar that needs to be painted. 

ARect indicates the dimensions of the toolbar on the canvas. 

Stage indicates the current stage of the drawing process. 

Leave DefaultDraw as true if the toolbar should continue with the normal painting process. Set DefaultDraw to false if the OnAdvancedCustomDraw event handler has completely painted the toolbar. DefaultDraw is only meaningful when Stage is cdPrePaint.

Note: OnAdvancedCustomDraw occurs at several points during the painting of the toolbar's background. If you only need to respond immediately prior to the default painting of the toolbar, use OnCustomDraw instead.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!