The HorizontalScrollbarMode
property of the TextEdit
class specifies the behavior of the horizontal scrollbar within the text editor widget. It determines how and when the horizontal scrollbar is displayed based on the content and the size of the text editor.
To use the HorizontalScrollbarMode
property, you can get or set its value to control the visibility and behavior of the horizontal scrollbar in a TextEdit
instance. The property accepts values from the Editor.ScrollbarMode
enumeration, which typically includes options such as AlwaysOff
, AlwaysOn
, and Auto
.
For example, setting the property to Editor.ScrollbarMode.Auto
will make the scrollbar appear only when the text content exceeds the visible area of the text editor horizontally.