GetItemImageIndex (ListViewEx)

Class

ListViewEx.

Action

Returns the index into the image list or the index into the state image list for listviews that contain icons.

Availability

This functionality is supported only if you are using the Open Agent.

Syntax

iIndex = object.GetItemImageIndex (liItem, fromStateImageList)
Variable Description
iIndex Index to the icon of the item in the image list or to the state of the icon in the state image list. INTEGER.
liItem Item in the listview. LISTITEM.
fromStateImageList If FALSE, then the GetItemImageIndex method returns the index to the icon of the item in the image list. If TRUE, then the GetItemImageIndex method returns the index to the state of the icon in the state image list. FALSE by default. BOOLEAN.

Example

INTEGER iItem, iIndex
STRING sText
for iItem = 2 to 3
sText = Options.Advanced.OptionsTreeView.GetItemText(iItem)
iIndex = Options.Advanced.OptionsTreeView.GetItemImageIndex(iItem)
Print("{sText}: {iIndex}")