GetItems Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Gets all editable regions at the current text input position. The method returns null, if there is no region at the current input position.
Syntax
public EditableRegion[] GetItems();Public Function GetItems() As EditableRegion()Return Value
The return value is null, if there is no editable region at the current input position. Otherwise, it is an array of objects of the type EditableRegion.
Examples
The following example works with editable regions in the current document by using EditableRegionCollection.GetItems.
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
EditableRegionCollection editableRegionCollection = textControl.EditableRegions;
editableRegionCollection.Add(new EditableRegion("ReviewTeam", 100));
EditableRegion[] results = editableRegionCollection.GetItems();
foreach (EditableRegion editableRegion in results)
{
Console.WriteLine(editableRegion);
}textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim editableRegionCollection As EditableRegionCollection = textControl.EditableRegions
editableRegionCollection.Add(New EditableRegion("ReviewTeam", 100))
Dim results As EditableRegion() = editableRegionCollection.GetItems()
For Each editableRegion As EditableRegion In results
Console.WriteLine(editableRegion)
Next