Label.ImageKey Właściwość

Definicja

Pobiera lub ustawia metodę dostępu klucza dla obrazu w pliku ImageList.

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

Wartość właściwości

String

Ciąg reprezentujący klucz obrazu.

Atrybuty

Uwagi

Właściwość ImageKey określa obraz z listy obrazów do wyświetlenia na .Label

ImageKey i ImageIndex wzajemnie wykluczają się, co oznacza, że jeśli jeden jest ustawiony, drugi jest ustawiony na nieprawidłową wartość i ignorowany. Jeśli ustawisz ImageKey właściwość , właściwość zostanie automatycznie ustawiona ImageIndex na -1. Alternatywnie, jeśli ustawisz ImageIndex właściwość , ImageKey właściwość zostanie automatycznie ustawiona na pusty ciąg ("").

Dotyczy