Condividi tramite


Label.ImageKey Proprietà

Definizione

Ottiene o imposta la funzione di accesso della chiave per l'immagine in 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

Valore della proprietà

Stringa che rappresenta la chiave dell'immagine.

Attributi

Commenti

La ImageKey proprietà specifica l'immagine dall'elenco di immagini da visualizzare nell'oggetto Label.

ImageKey e ImageIndex si escludono a vicenda, ovvero se ne è impostata una, l'altra viene impostata su un valore non valido e ignorata. Se si imposta la ImageKey proprietà , la ImageIndex proprietà viene impostata automaticamente su -1. In alternativa, se si imposta la ImageIndex proprietà , l'oggetto ImageKey viene impostato automaticamente su una stringa vuota ("").

Si applica a