Icons, SmallIcons Properties

           

Returns or sets the ImageList controls associated with the Icon and SmallIcon views in a ListView control.

Syntax

object.Icons [= imagelist]

object.SmallIcons [= imagelist]

The Icons, SmallIcons properties syntax has the following parts:

Part Description
object An object expression that evaluates to the ListView control.
imagelist An object expression that evaluates to an ImageList control.

Remarks

To associate an ImageList control with a ListView control at run time, set these properties to the desired ImageList control.

Each ListItem object in the ListView control also has Icon and SmallIcon properties, which index the ListImage objects and determine which image is displayed.

Once you associate an ImageList with the ListView control, you can use the value of either the Index or Key property to refer to a ListImage object in a procedure.