GetItem Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
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();Public Function GetItem() As TrackedChangeGetItem(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);Public Function GetItem([next] As Boolean) As TrackedChange| Parameter | Description |
|---|---|
| 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();Dim changes As TrackedChangeCollection = textControl.TrackedChanges
Dim nextChange As TrackedChange = changes.GetItem(True)
If nextChange IsNot Nothing Then nextChange.Select()