System.Windows.Forms.TreeView.SelectedImageKey Property

Gets or sets the key of the default image shown when a System.Windows.Forms.TreeNode is in a selected state.

Syntax

[System.ComponentModel.Editor("System.Windows.Forms.Design.ImageIndexEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageKeyConverter))]
[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)]
[System.Windows.Forms.RelatedImageList("ImageList")]
[System.ComponentModel.DefaultValue("")]
[System.ComponentModel.Localizable(true)]
public string SelectedImageKey { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

If a System.Windows.Forms.TreeNode does not have a selected image set, the image specified by the TreeView.SelectedImageKey property will be shown when the node is not selected.

The TreeView.SelectedImageKey and TreeView.SelectedImageIndex properties are mutually exclusive; if one is set, the other is ignored. If you set the TreeView.SelectedImageKey property, the TreeView.SelectedImageIndex property is automatically set to -1. Alternatively, if you set the TreeView.SelectedImageIndex property, the TreeView.SelectedImageKey is automatically set to an empty string ("").

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0