RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TListView.OnAdvancedCustomDraw Event

Occurs at discrete points during the rendering of the list view.

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

Write an OnAdvancedCustomDraw event handler to customize the painting of the list view at various stages before its items are drawn. Unlike the OnDrawItem event, the list view receives this event even if the OwnerDraw property is false.  

Sender is the list view that is about to be painted. 

ARect indicates the dimensions of the list view on its Canvas

Stage indicates the current stage in the drawing process. Note that the cdPreErase and cdPostErase stages do not receive event notification. The background must be drawn when the item is rendered. 

DefaultDraw is used only when Stage is cdPrePaint. It indicates whether the list view should continue with the default painting after the event handler exits. Set DefaultDraw to false to prevent the drawing of the list view after event handler exits. If DefaultDraw remains set to true, the list view continues with the default painting process.

Note: OnAdvancedCustomDraw occurs at various stages during the paint process. If you are only writing code to execute immediately prior to rendering the list view, it is more efficient to use the OnCustomDraw event.
 

 

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