RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomListView.OnCustomDraw Event

Occurs when an owner-draw list view must be rendered.

Pascal
property OnCustomDraw: TLVCustomDrawEvent;
C++
__property TLVCustomDrawEvent OnCustomDraw;

Write an OnCustomDraw event handler to draw to the list view's Canvas before its items are painted. 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

DefaultDraw 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: OnCustomDraw occurs immediately prior to the rendering of the list view control. To augment the default drawing process at other stages (such as when the background is erased or after the list view is drawn), use the OnAdvancedCustomDraw event instead.
 

 

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