StateIcons Property

Gets or sets the name of the ImageList control which provides images used when the CheckBoxes property is turned on. Depreacted property.

object.StateIcons = [image]

Version Support

Obsolete from version 11.0. Refer to Deprecated and Obsolete items for additional information.

Use

This property is useful if you wish to display a custom image next to each list item or node instead of the standard checkbox graphic. It is also useful if you need an image that will update to reflect a change to the elements's state when the user clicks on it.

To use this property you first need to insert an ImageList control on your form and populate it with the image that you wish to display against each element (or more than one image if you wish to cycle through a collection of icons each time the user clicks the image.

Specify the name of this ImageList control in the StateIcons property.

TIP:

The results of setting this property will only be visible if the Checkboxes property is set to True and the image list control you have specified contains one or more images.

    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. The Icons graphic has two states, normal and selected - these must be set at the individual node or list item level. The selected image is displayed when the user clicks on the element itself (as opposed to the graphic).

To display the StateIcons graphics, the checkboxes property must be turned on. To display Icons graphics, the Style property must be set to one of the Picture settings (see the Style property for more information).

See Also

CheckBoxes property | ImageList control | Style property| LineStyle property | Icons property

Applies To

TreeView control

ListView control


© 2004-2021 looksoftware. All rights reserved.