RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TToolBar.CustomDraw Method

Generates OnCustomDraw and OnAdvancedCustomDraw events.

Pascal
function CustomDraw(const ARect: TRect; Stage: TCustomDrawStage): Boolean; virtual;
C++
virtual __fastcall Boolean CustomDraw(const TRect ARect, TCustomDrawStage Stage);

CustomDraw is called automatically at discrete stages during the drawing process to generate the OnCustomDraw and OnAdvancedCustomDraw events. 

ARect specifies the boundaries of the toolbar on the toolbar's Canvas

Stage indicates the current stage of the paint process. When Stage is cdPrePaint, CustomDraw generates an OnCustomDraw event followed by an OnAdvancedCustomDraw event. At all other stages, CustomDraw generates only the OnAdvancedCustomDraw event. 

CustomDraw returns true if the toolbar should continue with its default painting sequence, false if the painting sequence should end after the call. 

 

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