Selection Constructor
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Creates a new instance of the Selection class.
Syntax
Selection()
Creates an empty Selection object with all properties set to their default values.
public Selection();Public Sub New()Selection(int, int)
Creates an instance of the Selection class with the specified start value and length. All other properties are set to their default values.
public Selection(int start, int length);Public Sub New(start As Integer, length As Integer)| Parameter | Description |
|---|---|
| start | Specifies the selection's start position. |
| length | Specifies the number of selected characters. |
Examples
The following example creates a reusable selection format and applies it to the current report heading.
textControl.Text = "Quarterly results";
textControl.Select(0, textControl.Text.Length);
Selection selection = new() { Bold = true, FontSize = 280 };
textControl.Selection = selection;textControl.Text = "Quarterly results"
textControl.Select(0, textControl.Text.Length)
Dim selection As New Selection() With { .Bold = True, .FontSize = 280 }
textControl.Selection = selection