ScrollTo Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Sets the current input position to the beginning of an editable region and scrolls it into the visible part of the document.
Syntax
public bool ScrollTo();Public Function ScrollTo() As BooleanReturn Value
The return value is true, if the editable region could be scrolled. Otherwise it is false.
Examples
The following example marks selected contract text as editable by the review team by using EditableRegion.ScrollTo.
textControl.Text = "Terms subject to legal review";
textControl.Select(0, textControl.Text.Length);
EditableRegion editableRegion = new("ReviewTeam", 10);
textControl.EditableRegions.Add(editableRegion);
if (editableRegion.ScrollTo())
{
Console.WriteLine("Scroll To completed successfully.");
}textControl.Text = "Terms subject to legal review"
textControl.Select(0, textControl.Text.Length)
Dim editableRegion As New EditableRegion("ReviewTeam", 10)
textControl.EditableRegions.Add(editableRegion)
If editableRegion.ScrollTo() Then
Console.WriteLine("Scroll To completed successfully.")
End If