TX Text Control .NET for Windows Forms

SelectionLength 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 number of characters in the current selection in the text box.

Syntax

public int SelectionLength { get; set; }

Examples

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

ribbonTextBox.SelectionLength = 1;
ribbonTextBox.Update();