RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomListView.OnDrawItem Event

Occurs when an item should be drawn in the list view.

Pascal
property OnDrawItem: TLVDrawItemEvent;
C++
__property TLVDrawItemEvent OnDrawItem;

Write code in an OnDrawItem handler to manually draw items in the list view. This event occurs only if OwnerDraw is true.

Note: List views receive several other custom draw events, including OnCustomDraw, OnCustomDrawItem, OnCustomDrawSubItem, OnAdvancedCustomDraw, OnAdvancedCustomDrawItem, and OnAdvancedCustomDrawSubItem. These other events, unlike OnDrawItem, occur regardless of the value of the OwnerDraw property. They provide slightly different information about the state of the item to be drawn, and the OnAdvancedXXX events occur at more points during the paint process.
 

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