Item property (ImageList Control)

C++ Builder example

Delphi example

 

Builder Syntax

TLEADImageListItem* Item[int nIndex]

Delphi Syntax

Item[nIndex: Integer] : TLEADImageListItem

Overview

Refer to Using the Image List Control.

Remarks

This property returns an item from the ImageList Control's collection of items.

The index of the first item is 0, and the index of the last item is Count -1.

The Item object has the following properties (attributes):

Property

Type

Description

Bitmap

TBitmapHandle

The handle of the item’s bitmap

Text

String

The item’s text attribute.

Data

LongInt

Extra data for user-defined use.

Selected

Boolean

Selected flag. True if item is selected. False if item is not selected.

TextExt

String

The item’s Extra text attribute.

The Bitmap property can be used to copy or change the image that an item is displaying.

The Text property can be displayed as a label for the item if DisplayItemText is set to True.

The Data property can be used to store extra, user-defined information for each item.

The Selected property is used to indicate if an item is selected or not. When an item is selected, it is displayed according to the value set in the SelectionStyle and SelectionColor properties.

The TextExt property can be used to store an extra text string for the item. For example, the filename could be stored in Text (which gets displayed in the control), and the fully qualified path and filename in TextExt.

See Also

Elements

Count property, RowCount property, PageCount property, ColumnCount property, Insert method, Remove method, Clear method, SelectAll method, SelectionStyle property, SelectionColor property

Topics

Raster Images: Displaying Images