IMAGE-INDEX

Specifies an item's image index. This index determines the base image to be used from the IMAGE control associated with the item, or from its parent control's IMAGE-LIST if the former attribute is set to NULL-HANDLE.

The first case above, the image index is the zero-based relative index of the image within the specified image control, with wrap-around if the index is out of range. For example, if the referenced image control contains three images, the image indexes of 0, 3, 6, 9, and so on, will all select the first image.

In the second case above, the image index is the one-based absolute position of the required image in the parent control's image list, with no wrap-around for out-of-range values. For example, if the parent control's image list contains 10 images, an image index of 1 will select the first image from the first image control belonging to the image list. Similarly, an image index of 10 will select the last image from the last image control belonging to the image list. Out-of-range image index values, such as 11 in this case, are simply ignored.

Note:
With this absolute indexing mechanism, Natural does not automatically track changes made to to the image list. For example, if image 9 is removed from a 10-image image list, causing the 10th image to suddenly become the 9th image, items with an image index of 10 are neither automatically updated to 9, nor automatically refreshed to reflect the change.

For more information, please refer to the article Working with Image List Controls.

Applies to Image control, list view item, tree view item.
Data Type I4
Default Value 0
Possible Values Any positive value.