# TableOfContents.ScrollTo Method

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

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 29.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > TableOfContents.ScrollTo Method
- **491 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/scrollto-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/scrollto-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/scrollto-method/llms-full.txt

---

### 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

```csharp
public bool ScrollTo();
```

```vbnet
Public Function ScrollTo() As Boolean
```

### 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`.

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

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

```vbnet
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
```

---

## Nearby

- **Previous:** [TableOfContents.Save Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/save-method/llms-full.txt)
- **Next:** [TableOfContents.Start Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/start-property/llms-full.txt)
