TX Text Control .NET for Windows Forms

GetItem Method

Method|Introduced in 14.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets a particular page from the collection.

Syntax

GetItem()

Gets the Page containing the current text input position from the collection.

public Page GetItem();

GetItem(int)

Gets the Page at a certain text input position.

public Page GetItem(int textPosition);
ParameterDescription
textPosition

Specifies a zero-based text input position.

Return Value

The return value is null, if a page could not be found. Otherwise, it is an object of the type Page.

Examples

The following example works with the laid-out pages of a short report by using PageCollection.get_Item.

textControl.Text = "Quarterly results\nRevenue increased by 12%.";
PageCollection pageCollection = textControl.GetPages();

Page result = pageCollection.GetItem(1);
result?.Select();