Overview of the TextField and Hypertext Link Classes

The base class for all types of text fields is the TextField class. It implements the base functionality of marked text fields like text and position, editing features, and data and event handling. These base features are explained later in this article. Additional classes, all of which are derived from the TextField class, are available for special types of marked text fields. These are listed in the following table:

Class Description
TextField Class Implements a general text field. It can be used to handle database fields, spreadsheet features or bookmarks.
HypertextLink Class Derived class that implements a hypertext link. It can be used for links that point to targets outside of the current document.
DocumentLink Class Derived class that can be used for links that point to targets inside of the current document.
DocumentTarget Class Derived class that implements a target in a document.
PageNumberField Class Derived class that implements a field that automatically shows the current page number. This field can only be used in a header or a footer.
ApplicationField Class Derived class that implements a field providing an interface to retrieve and change the data and parameters of Microsoft Word fields and Heiler HighEdit fields.

For each type of text field, a Text Control manages a collection containing all fields of the same type. The collections can be used to add or remove fields, to get a individual item or to enumerate all fields of a certain type. Each collection is available through a readonly property of the TextControl, WPF.TextControl and ServerTextControl classes. The collection of page number fields can only be obtained through a property of the HeaderFooter class. The following table lists all available collections and their corresponding properties:

Collection Class Obtaining Property
TextFieldCollection TextControl.TextFields, WPF.TextControl.TextFields, ServerTextControl.TextFields, HeaderFooter.TextFields
HypertextLinkCollection TextControl.HypertextLinks, WPF.TextControl.HypertextLinks, ServerTextControl.HypertextLinks
DocumentLinkCollection TextControl.DocumentLinks, WPF.TextControl.DocumentLinks, ServerTextControl.DocumentLinks
DocumentTargetCollection TextControl.DocumentTargets, WPF.TextControl.DocumentTargets, ServerTextControl.DocumentTargets
PageNumberFieldCollection HeaderFooter.PageNumberFields
ApplicationFieldCollection TextControl.ApplicationFields, WPF.TextControl.ApplicationFields, ServerTextControl.ApplicationFields