TXTextControl.Page Class

An object of the Page class represents a formatted page of a document. Pages are numbered from the beginning to the end of the document beginning with 1. A document has at least one page. Each section of a document can have one or more pages depending on the text that is contained in the section. A section does not have to begin at the top of a page. Therefore more than one section can be on one page. A page object can be obtained from the page collection available through the TextControl.GetPages method. This collection is only available, if the TextControl.ViewMode property has been set to PageView.

Introduced: 14.0.


public class Page
[Visual Basic]
Public Class Page


Property Description
Bounds Gets the bounding rectangle of the page, in twips, relative to the top of the document.
Footer Gets the footer of the page.
Header Gets the header of the page.
Length Gets the number of characters of the page, including the page break character at the end of the page.
Number Gets the page's number.
NumberInSection Gets the page number relative to the beginning of the section the page belongs to.
Section Gets the number, one-based, of the section the page belongs to.
Start Gets the number (one-based) of the page's first character.
TextBounds Gets the bounding rectangle of the page's text, in twips, relative to the top of the document.


Method Description
GetImage Overloaded. Gets an image of the page's contents.
Select Selects the text of the page.


The following example shows how to scroll to a specific page.

textControl1.ViewMode = TXTextControl.ViewMode.PageView;

for (int i = 0; i < 100; i++)
    textControl1.Selection.Text = new string('a', 200);

textControl1.ScrollLocation = new Point(textControl1.ScrollLocation.X,
[Visual Basic]
TextControl1.ViewMode = TXTextControl.ViewMode.PageView

For i = 1 To 100
    TextControl1.Selection.Text = New String("a", 200)
    i = i + 1

TextControl1.ScrollLocation = New Point(TextControl1.ScrollLocation.X, _

See Also