TX Text Control .NET Server

ScrollTo Method

Method|Introduced in 29.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Sets the current input position to the beginning of the table of contents and scrolls it into the visible part of the document.

Syntax

public bool ScrollTo();

Return Value

The return value is true, if the table of contents could be scrolled. Otherwise it is false.

Examples

The following example creates a table of contents for the document's heading styles by using TableOfContents.ScrollTo.

TableOfContents tableOfContents = new(1, 3) { Name = "Contents", ID = 10 };
textControl.TablesOfContents.Add(tableOfContents);

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