TreeNode.SelectedImageKey Właściwość

Definicja

Pobiera lub ustawia klucz obrazu wyświetlanego w węźle drzewa, gdy jest w wybranym stanie.

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

Wartość właściwości

Klucz obrazu wyświetlany, gdy węzeł drzewa jest w wybranym stanie.

Atrybuty

Uwagi

Klucz obrazu zwrócony przez tę właściwość jest zawarty we ImageList właściwości kontrolki nadrzędnej TreeView .

SelectedImageKey i SelectedImageIndex wzajemnie wykluczają się, co oznacza, że jeśli jest ustawiona, druga jest ustawiona na nieprawidłową wartość i ignorowana. Jeśli właściwość zostanie ustawiona SelectedImageKey , SelectedImageIndex właściwość zostanie automatycznie ustawiona na -1. Alternatywnie, jeśli właściwość zostanie ustawiona SelectedImageIndex , SelectedImageKey zostanie automatycznie ustawiona na pusty ciąg ("").

Dotyczy