TX Text Control .NET for Windows Forms

Select Method

Method
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Selects text within the Text Control.

Syntax

public void Select(int start, int length);

Parameters

ParameterDescription
start

Specifies the selection's start position.

length

Specifies the number of selected characters.

Examples

The following example selects the report title and formats it as a heading.

textControl.Text = "Quarterly report\nPrepared for Contoso Ltd.";
textControl.Select(0, "Quarterly report".Length);
textControl.Selection.Bold = true;