Select Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesServer. dll
Description
Selects text within the control.
Syntax
public void Select(int start, int length);Public Sub [Select](start As Integer, length As Integer)Parameters
| Parameter | Description |
|---|---|
| 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;textControl.Text = "Quarterly report" & vbCrLf & "Prepared for Contoso Ltd."
textControl.Select(0, "Quarterly report".Length)
textControl.Selection.Bold = True