Icons Property

Gets or sets the name of the ImageList control which provides the images associated with this control. Smartclient-only.

object.Icons = [string]

Where object is an object expression that evaluates to one of the controls in the Applies To list, and string is a string expression specifying the name of the ImageList control.

Client support

Newlook Smartclient only.

Use

This property is useful if you wish to display different images against individual list items or nodes.

An image list must already exist on the form and have a valid name to be assigned to this property.

TIP:

For the list view control, this property is only relevant if the View property is set to ViewIcon. For the tree view control, this property is only applied if the Style property is set to TreeViewPictureText, TreeViewPlusPictureText, TreeViewLinesPictureText or TreeViewLinesPlusPictureText.

 StateIcons property vrs Icons property

The StateIcons and Icons properties have two very distinct differences:

  1. Scope: The StateIcons property assigns the same graphic to every element (node or list item) in the control. The Icons property, when used in conjunction with the Node or List Item's Icon property can be used to assign a graphic to individual elements.
  2. Amination: The StateIcons graphic cycles to the next image in the collection when the user clicks on the graphic - giving a visual indication of the state of the element.

To display the StateIcons graphics, the checkboxes property must be turned on. To display Icons graphics in Treeview controls, the Style property must be set to one of the values listed in the Tips section - see above. To use the Icons property in a ListView control, the View property must be set to ViewIcon.

See Also

View property | SelectedIcon property | ForeColor property | BackColor property | Style property | Icon property | StateIcons property | SmallIcons property

Applies To

Treeview Control

ListView control


© 2004-2021 looksoftware. All rights reserved.