TX Text Control .NET for Windows Forms

SelectedText Property

Property|Introduced in 26.0
Namespace
TXTextControl.Windows.Forms.Ribbon
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets the text of the current selection in the text box.

Syntax

public string SelectedText { get; set; }

Examples

The following example uses RibbonTextBox.SelectedText to configure selected text as part of the ribbon text box workflow. The change is then applied to the active document or user interface.

ribbonTextBox.SelectedText = "Quarterly results";
ribbonTextBox.Update();