ScrollTo 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
Sets the current input position to the beginning of a subtextpart 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 subtextpart could be scrolled. Otherwise it is false.
Examples
The following example marks the selected customer name as a named document region by using SubTextPart.ScrollTo.
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
SubTextPart subTextPart = new("CustomerName", 10);
textControl.SubTextParts.Add(subTextPart);
if (subTextPart.ScrollTo())
{
Console.WriteLine("Scroll To completed successfully.");
}textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim subTextPart As New SubTextPart("CustomerName", 10)
textControl.SubTextParts.Add(subTextPart)
If subTextPart.ScrollTo() Then
Console.WriteLine("Scroll To completed successfully.")
End If