ListBox.Text Proprietà
Definizione
public:
virtual property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public override string Text { get; set; }
[<System.ComponentModel.Bindable(false)>]
[<System.ComponentModel.Browsable(false)>]
member this.Text : string with get, set
Public Overrides Property Text As String
Valore della proprietà
Testo dell'elemento attualmente selezionato nel controllo.The text of the currently selected item in the control.
- Attributi
Commenti
Quando il valore di questa proprietà è impostato su un valore stringa, ListBox Cerca l'elemento all'interno dell'oggetto ListBox che corrisponde al testo specificato e seleziona l'elemento.When the value of this property is set to a string value, the ListBox searches for the item within the ListBox that matches the specified text and selects the item. È anche possibile usare questa proprietà per determinare gli elementi attualmente selezionati in ListBox .You can also use this property to determine which items are currently selected in the ListBox. Se la SelectionMode proprietà di ListBox è impostata su SelectionMode.MultiExtended
, questa proprietà restituisce il testo del primo elemento selezionato.If the SelectionMode property of the ListBox is set to SelectionMode.MultiExtended
, this property returns the text of the first selected item. Se la SelectionMode proprietà di ListBox non è impostata su SelectionMode.None
, questa proprietà restituisce il testo del primo elemento selezionato.If the SelectionMode property of the ListBox is not set to SelectionMode.None
, this property returns the text of the first selected item.