語言

ToolStripComboBox.SelectedText 屬性

定義

取得或設定在可編輯部分 ToolStripComboBox所選取的文字。

public:
 property System::String ^ SelectedText { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Browsable(false)]
public string SelectedText { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.SelectedText : string with get, set
Public Property SelectedText As String

屬性值

一個字串代表組合框中目前選取的文字。 若 DropDownStyle 設為 DropDownList,則回傳值為空字串(“”)。

屬性

備註

你可以將文字指派到這個屬性,以改變組合框中目前選取的文字。 如果組合框中目前沒有選取任何文字,這個屬性會回傳一個長度為零的字串。

適用於