Description
The VerticalScrollbar
property of the TextEdit
class provides access to the vertical scrollbar associated with the text editor widget. This scrollbar allows users to scroll through the text content vertically, especially useful when the content exceeds the visible area of the TextEdit
widget.
Usage
To access or modify the vertical scrollbar of a TextEdit
instance, use the VerticalScrollbar
property. This property returns an instance of Editor.ScrollBar
, which can be used to control the scrollbar's behavior and appearance.
Example usage:
TextEdit textEdit = new TextEdit();
Editor.ScrollBar verticalScrollBar = textEdit.VerticalScrollbar;
// Example: Set the scrollbar to be always visible
verticalScrollBar.Visibility = ScrollbarVisibility.Always;
// Example: Scroll to the bottom of the text
textEdit.ScrollToBottom();
Example
TextEdit textEdit = new TextEdit();
Editor.ScrollBar verticalScrollBar = textEdit.VerticalScrollbar;
// Example: Set the scrollbar to be always visible
verticalScrollBar.Visibility = ScrollbarVisibility.Always;
// Example: Scroll to the bottom of the text
textEdit.ScrollToBottom();