Type: Boolean (TextBox class), Integer (ListBox class)
Availability: Read or write at any time
The scrollHorizontal property of a text box specifies whether the text scrolls horizontally. For a list box, it controls whether a list box control has a horizontal scroll bar added when a list box line item does not horizontally fit in the list box.
The settings for the scrollHorizontal property for TextBox controls are listed in the following table.
Value | Description |
---|---|
false | None (the default) |
true | Text scrolls when the size of the text box is exceeded by the entered text |
By default, the text in a text box does not scroll horizontally when the text is about to exceed the horizontal size of the control. If the height of the text box allows for more than one line of text, the text word-wraps onto the next line, until all visible lines are full.
Setting the scrollHorizontal property to true means that the text scrolls to the right as text is entered and the width of the text exceeds the width of the text area of the text box. If the value of the scrollHorizontal property is true, no word wrapping occurs, and the Enter key must be pressed to terminate the current line and to start a new line.
If the value of the alignment property of a text box is Alignment_Right or Alignment_Center, setting the value of the scrollHorizontal property to true has no effect.
Setting the scrollBars property so that a horizontal or vertical bar is displayed causes the scrollHorizontal property to be set to true. Setting the scrollHorizontal property to true does not cause scroll bars to be displayed, as this is achieved by setting the scrollBars property.
The settings for the scrollHorizontal property for ListBox controls are listed in the following table.
ListBox Class Constant | Value | Description |
---|---|---|
ScrollHorizontal_None | 0 | No horizontal scroll bar is displayed (the default) |
ScrollHorizontal_Auto | 1 | A horizontal scroll bar is added automatically when a list line item cannot be fully displayed horizontally in the list box |