Overview | Methods | This Package | All Packages
Sets the index of the image that appears by default next to nodes in the tree view control.
Syntax
public void setImageIndex( int value )
Parameters
value
The zero-based index within an ImageList object of the image that appears by default next to the node. The default value is zero (0).
Remarks
The default image will not appear next to a node if you have explicitly set the imageIndex property for that node to another image. In addition, if you have set the selectedImageIndex property of the tree view control to a different image, that image will appear next to the node instead of the default image when the node is selected. To display images in a tree view control, you must create an ImageList object, add images to the ImageList object, associate the ImageList object with the TreeView control using the setImageList method, and specify which image to display next to nodes in the tree view using the setImageIndex method. If you want a different image to display next to a node when it is selected, use the setSelectedImageIndex method.
See Also getImageIndex