A SubTextPart object represents a user-defined part of a TX Text Control document. A TX Text Control document consists of the main text, and additionally other pieces of text such as text frames and headers or footers, called textparts. A programmer can define further parts called subtextparts to perform operations on smaller pieces of text. Each of the main textparts has a SubTextPartCollection which can be used to add and remove subtextparts or to save the subtextpart's text.

Syntax

public class SubTextPart
Public Class SubTextPart

Introduced: X13.

Constructors

Constructor Description
SubTextPart Initializes a new instance of the SubTextPart class.

Methods

Method Description
Save Saves the subtextpart's text with the specified format.
ScrollTo Sets the current input position to the beginning of a subtextpart and scrolls it into the visible part of the document.

Properties

Property Description
Data Gets or sets additional data of the subtextpart.
HighlightColor Gets or sets the highlight color for the subtextpart.
HighlightMode Gets or sets a value indicating when the subtextpart is highlighted.
ID Gets or sets the subtextpart's identifier.
Length Gets the number of characters which belong to the subtextpart.
Name Gets or sets the name of the subtextpart.
NestedLevel Gets the subtextpart's nested level.
Number Gets the subtextpart's number.
OuterMostSubTextPart Gets a subtextpart's outermost subtextpart.
OuterSubTextPart Gets a subtextpart's outer subtextpart.
Start Gets the index (one-based) of the first character which belongs to the subtextpart.
Text Gets the subtextpart's text.

Further Reading

Learn more about the TXTextControl.SubTextPart Class in the Text Control Blog: