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 Selection object.

In order to manipulate the text in a HeaderFooter object, you would need to access the HeaderFooter.Selection object. 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 TextPartCollection. An instance of the TextPartCollection class contains all text parts in a TX Text Control document. Each text part of a document is implemented as an IFormattedText 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:

Loading...

This method is very handy to access all ApplicationFields in a document:

Loading...