Using Headers and Footers

Technical Articles > Headers and Footers

Headers and footers are only visible when the ViewMode property has been set to Page View.

Headers and footers are parts of a document. The HeaderFooter property determines whether headers and footers, only headers or only footers are contained. Additionally special headers and/or footers for the first page can be specified with this property. To edit a header or footer, it must be activated either with the HeaderFooterActivate method or with a mouse double-click in a header's or footer's area. An activated header or footer gets the input focus and its border is shown with a dotted frame. When a header or footer is activated, the main text is displayed in gray, otherwise a header's or footer's text is displayed in gray. Text Control fires HeaderFooterActivated and HeaderFooterDeactivated events to inform the application about activation or deactivation of headers or footers.

The HeaderFooterStyle property allows the following style settings:

The default style setting is a dotted frame and a mouse interface that activates a header or footer with double-clicks.

By default the top of a header has a distance of one centimeter from the top of the page and the bottom of a footer has a distance of one centimeter from the bottom of the page. With the HeaderFooterPosition property these values can be changed. The height of a header or footer depends on the header's or footer's current text.

When a document is loaded or converted from another format, contained headers and footers are automatically displayed. The HeaderFooter property returns the information which headers and/or footers the current document contains.