# CommentedText.ScrollTo Method

> Sets the current input position to the first position of the commented text and scrolls it into the visible part of the document.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 30.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 > CommentedText.ScrollTo Method
- **855 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/scrollto-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/scrollto-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/scrollto-method/llms-full.txt

---

### Description

Sets the current input position to the first position of the commented text and scrolls it into the visible part of the document.

### Syntax

#### ScrollTo()

Scrolls the beginning of the commented text into the visible part of the document using a default position depending on the previous position.

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

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

#### ScrollTo(InputPosition.ScrollPosition)

Scrolls the beginning of the commented text into the visible part of the document using the specified position.

```csharp
public bool ScrollTo(InputPosition.ScrollPosition position);
```

```vbnet
Public Function ScrollTo(position As InputPosition.ScrollPosition) As Boolean
```

| Parameter | Description |
|---|---|
| position | Specifies an [InputPosition.ScrollPosition](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inputposition/scrollposition-enumeration/llms-full.txt) value. |

### Return Value

The return value is true, if the document has been scrolled. Otherwise it is false.

### Examples

The following example attaches a reviewer comment to selected contract text by using `CommentedText.ScrollTo`.

```csharp
textControl.Text = "Payment is due within 30 days.";
textControl.Select(0, textControl.Text.Length);
CommentedText commentedText = new("Verify the payment term.");
textControl.Comments.Add(commentedText);

if (commentedText.ScrollTo(InputPosition.ScrollPosition.Auto))
{
    Console.WriteLine("Scroll To completed successfully.");
}
```

```vbnet
textControl.Text = "Payment is due within 30 days."
textControl.Select(0, textControl.Text.Length)
Dim commentedText As New CommentedText("Verify the payment term.")
textControl.Comments.Add(commentedText)

If commentedText.ScrollTo(InputPosition.ScrollPosition.Auto) Then
    Console.WriteLine("Scroll To completed successfully.")
End If
```

---

## Nearby

- **Previous:** [CommentedText.Save Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/save-method/llms-full.txt)
- **Next:** [CommentedText.Select Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/select-method/llms-full.txt)
