TX Text Control .NET for Windows Forms

Number Property

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

Description

Gets the subtextpart's number. The first subtextpart has the number 1. The number is defined through the textflow. A textpart with a smaller start position has a smaller number. When an outer subtextpart has the same start position than one of its nested textparts the outer textpart has a smaller number.

Syntax

public int Number { get; }

Examples

The following example marks the selected customer name as a named document region by using SubTextPart.Number.

textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
SubTextPart subTextPart = new("CustomerName", 10);
textControl.SubTextParts.Add(subTextPart);

Console.WriteLine($"Number: {subTextPart.Number}");
Console.WriteLine("Sub Text Part is ready for use.");

Limitations

Read only.