ScrollTo Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
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.
public bool ScrollTo();Public Function ScrollTo() As BooleanScrollTo(InputPosition.ScrollPosition)
Scrolls the beginning of the commented text into the visible part of the document using the specified position.
public bool ScrollTo(InputPosition.ScrollPosition position);Public Function ScrollTo(position As InputPosition.ScrollPosition) As Boolean| Parameter | Description |
|---|---|
| position | Specifies an InputPosition.ScrollPosition 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.
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.");
}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