In TX Text Control, a document consists of separate text areas such as main text, headers, footers and text frames. Each of these areas have their own collections for contained elements such as lines, images, fields or the TXText
╰ TXTextControl Namespace
╰ Selection Class
The Selection class describes and handles the attributes of a text selection. object.
In order to manipulate the text in a TXText
╰ TXTextControl Namespace
╰ HeaderFooter Class
An instance of the HeaderFooter class represents a header or footer in a Text Control document. object, you would need to access the TXText
╰ TXTextControl Namespace
╰ HeaderFooter Class
╰ Selection Property
Gets or sets the current selection in a header or footer. . To manipulate text in all headers and footers, you would need to loop through all available objects.
To avoid that, we implemented the "meta" collection TXText
╰ TXTextControl Namespace
╰ TextPartCollection Class
An instance of the TextPartCollection class contains all text parts in a TX Text Control document. . An instance of this class contains all text parts in a TX Text Control document. Each text part of a document is implemented as an IFormatted
╰ TXTextControl Namespace
╰ IFormattedText Interface Interface
The IFormattedText interface contains properties and methods common to all text parts in a TX Text Control document. interface. The IFormattedText interface contains properties and methods common to all text parts in a TX Text Control document.
In order to set text to the beginning of each text part in the complete document, the following code can be used:
foreach (IFormattedText ftTextPart in textControl1.TextParts) | |
{ | |
ftTextPart.Selection.Start = 0; | |
ftTextPart.Selection.Text = "TX Text Control"; | |
} |
This method is very handy to access all Application
╰ TXTextControl Namespace
╰ TextControl Class
╰ ApplicationFields Property
Gets a collection of all application fields contained in the text part with the input focus. in a document:
foreach (IFormattedText ftTextPart in textControl1.TextParts) | |
{ | |
foreach (ApplicationField field in ftTextPart.ApplicationFields) | |
{ | |
field.Text = "Test"; | |
} | |
} |