Bagikan melalui


TreeNode.SelectedImageKey Properti

Definisi

Mendapatkan atau mengatur kunci gambar yang ditampilkan di simpul pohon saat berada dalam status yang dipilih.

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

Nilai Properti

Kunci gambar ditampilkan saat simpul pohon dalam keadaan dipilih.

Atribut

Keterangan

Kunci gambar yang dikembalikan oleh properti ini terkandung dalam ImageList properti kontrol induk TreeView .

SelectedImageKey dan SelectedImageIndex saling eksklusif, yang berarti jika satu diatur, yang lain diatur ke nilai yang tidak valid dan diabaikan. Jika Anda mengatur SelectedImageKey properti , SelectedImageIndex properti secara otomatis diatur ke -1. Atau, jika Anda mengatur SelectedImageIndex properti, SelectedImageKey secara otomatis diatur ke string kosong ("").

Berlaku untuk