TX Text Control .NET for Windows Forms

ScrollTo Method

Method
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Sets the current text input position to the target's position and scrolls it into the visible part of the document.

Syntax

public bool ScrollTo();

Return Value

The return value is true, if the target has been scrolled into the visible part of the document. Otherwise it is false.

Examples

The following example creates a named destination for an internal document link by using DocumentTarget.ScrollTo.

DocumentTarget documentTarget = new("CustomerDetails");
textControl.DocumentTargets.Add(documentTarget);

if (documentTarget.ScrollTo())
{
    Console.WriteLine("Scroll To completed successfully.");
}