Compartir por


TreeNode.StateImageKey Propiedad

Definición

Obtiene o establece la clave de la imagen que se usa para indicar el estado de TreeNode cuando el elemento primario TreeView tiene su CheckBoxes propiedad establecida falseen .

public:
 property System::String ^ StateImageKey { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageKeyConverter))]
[System.Windows.Forms.RelatedImageList("TreeView.StateImageList")]
public string StateImageKey { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageKeyConverter))>]
[<System.Windows.Forms.RelatedImageList("TreeView.StateImageList")>]
member this.StateImageKey : string with get, set
Public Property StateImageKey As String

Valor de propiedad

Clave de la imagen que se usa para indicar el estado de .TreeNode

Atributos

Comentarios

La clave de imagen devuelta por esta propiedad está contenida en la StateImageList propiedad del control primario TreeView .

Si el elemento primario tiene casillas habilitadas, StateImageKey se omite y el nodo mostrará la primera o segunda imagen del conjunto en el StateImageList elemento primario TreeViewTreeView para indicar un estado desactivado o activado, respectivamente. Alternar la Checked propiedad no afecta al valor de .StateImageKey

Las StateImageKey propiedades y StateImageIndex son mutuamente excluyentes, lo que significa que si se establece una, se omite la otra. Si establece la StateImageKey propiedad , la StateImageIndex propiedad se establece automáticamente en -1. Como alternativa, si establece StateImageIndex, StateImageKey se establece automáticamente en una cadena vacía (""). Debe establecer en StateImageKey una imagen con un índice correspondiente entre 0 y 14. Puede establecer en StateImageKey una imagen con un valor de índice mayor que 14 (no se producirá una excepción), pero es posible que no se muestre la imagen.

Se aplica a

Consulte también