StateImage Property (TreeViewItem Objects)

Applies to TestComplete 15.70, last modified on December 17, 2024

Description

Each item in a tree-view control can have up to four images associated with it.

  • An image, such as an open folder, displayed when the item is selected.
  • An image, such as a closed folder, displayed when the item is not selected.
  • An overlay image that is drawn transparently over the selected or non-selected image.
  • A state image: an additional image displayed to the left of the selected or non-selected image. You can use state images, such as checked and cleared check boxes, to indicate application-defined item states.

Use this property to get the item’s state image. To obtain the image for non-selected item, selected item or overlay image, use the Image, SelectedImage and OverlayImageIndex properties respectively.

To get the index of the state image read the StateImageIndex property.

Declaration

TestObj.StateImage

Read-Only Property A Picture object
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following object:

View Mode

To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Property Value

A Picture object that contains the item’s state image.

Example

To view an example that demonstrates how to use the StateImage property, see Getting Tree View Item's Images in Desktop Windows Applications.

See Also

Picture Object
Image Property (TreeViewItem Objects)
OverlayImageIndex Property (TreeViewItem Objects)
SelectedImage Property (TreeViewItem Objects)
StateImageIndex Property (TreeViewItem Objects)

Highlight search results