dotnet add package TXTextControl.TextControl.WinForms.SDK.NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
Implements
ICollection,IEnumerable
Description
Contains all subtextparts in the main text or another main part of a document. It is a collection of objects of the type SubTextPart. A collection object can be obtained with the TextControl.SubTextParts, the HeaderFooter.SubTextParts or the TextFrame.SubTextParts property. The SubTextPartCollection class implements the IEnumerable and the ICollection interfaces. The text of each main part of the document, which are the main text, a header or footer or a textframe, can be divided in further parts, called subtextparts. A subtextpart must be a selectable part of the document. It can immediately follow its previous textpart. The position between two textparts belongs to the following textpart. Subtextparts can be nested. A nested textpart must be smaller than its outer textpart. A nested textpart can start or end at the same position as its outer textpart, but a nested textpart cannot have the same length as its outer textpart. To insert a nested textpart its outer textpart must be inserted first. A textpart cannot have a length of zero. When the last character of a textpart is deleted, the textpart itself is also deleted.
Gets the subtextpart with the specified number from the collection. The number must be between 1 and Count. In C# this property is the indexer for the SubTextPartCollection class.
Adds a new subtextpart to the document. Its position is defined through the SubTextPart.Start and SubTextPart.Length properties. If the subtextpart's length is zero, the current text selection is used to define the position.