TX Text Control .NET for Windows Forms

GetItem Method

Method|Introduced in 26.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 item from the collection.

Syntax

GetItem()

Gets the change at the current text input position. If there is more than one change at the current input position the innermost change is returned.

public TrackedChange GetItem();

GetItem(bool)

Gets the next or the previous change in the textflow. The search begins at the current text input position.

public TrackedChange GetItem(bool next);
ParameterDescription
next

If this parameter is true, the next change in the textflow is returned. If this parameter is false, the previous change in the textflow is returned. The next or the previous change is returned independent whether there is a change at the current text input position.

Return Value

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

Examples

The following example retrieves and selects the next tracked change in text flow.

TrackedChangeCollection changes = textControl.TrackedChanges;
TrackedChange nextChange = changes.GetItem(true);
nextChange?.Select();