RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TListView.OnGetSubItemImage Event

Occurs when a subitem is about to be displayed in the column of a list view control.

Pascal
property OnGetSubItemImage: TLVSubItemImageEvent;
C++
__property TLVSubItemImageEvent OnGetSubItemImage;

Use OnGetSubItemImage to dynamically assign an image to a subitem before it is displayed in the column of a list view control. This event overrides the value specified by the list item's SubItemImages property. 

The Sender parameter is the list view that is being painted. 

The Item parameter is the item whose subitem is being painted. 

The SubItem parameter identifies the subitem from the list item's SubItems property. 

The ImageIndex parameter is an index into the list view's SmallImages property. On entry to the event handler, ImageIndex is initialized to the value specified by the list item's SubItemImages property for the subitem. Use this event handler to change that value or to suppress the image by setting ImageIndex to –1.

Note: OnGetSubItemImage only occurs if the list view's ViewStyle property is vsReport and the current list item's SubItems property contains subitems.
 

 

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