TextBox.SelectedText 属性

定义

获取或设置文本框中当前选择的内容。Gets or sets the content of the current selection in the text box.

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

属性值

文本框中当前选定的文本。The currently selected text in the text box.

注解

获取此属性将返回当前选定文本的字符串副本。Getting this property returns a string copy of the currently selected text. 设置此属性会将当前所选内容替换为指定的字符串。Setting this property replaces the current selection with the specified string.

适用于

另请参阅