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 the table of contents 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 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.");
}Dim tableOfContents As New TableOfContents(1, 3) With { .Name = "Contents", .ID = 10 }
textControl.TablesOfContents.Add(tableOfContents)
If tableOfContents.ScrollTo() Then
Console.WriteLine("Scroll To completed successfully.")
End If