TextBox.SelectedText 屬性

定義

取得或設定文字方塊中目前選取項目的內容。

public:
 property System::String ^ SelectedText { System::String ^ get(); void set(System::String ^ value); };
public string SelectedText { get; set; }
member this.SelectedText : string with get, set
Public Property SelectedText As String

屬性值

String

文字方塊中目前選取的文字。

備註

取得此屬性會傳回目前選取文字的字串複本。 設定此屬性會將目前的選取範圍取代為指定的字串。

適用於

另請參閱