ListBox.Text 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或搜尋目前選取項目 ListBox的文字。
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
屬性值
控制項中目前選取的項目文字。
- 屬性
備註
當此屬性的值設為字串值時,搜尋 ListBox 與指定文字相符的項目 ListBox 即可選擇該項目。 你也可以利用此屬性判斷目前在 中選取 ListBox的項目。 若 SelectionMode 的 ListBox 屬性設為 SelectionMode.MultiExtended,則該屬性會回傳第一個選取項目的文字。 如果 SelectionMode 的 ListBox 屬性未設為 SelectionMode.None,則該屬性會回傳第一個選取項目的文字。