ScrollBars

Returns or sets a value indicating whether an object has horizontal or vertical scroll bars. Read-only at run time.

Syntax

object.ScrollBars

The object placeholder represents an object expression that evaluates to an object.

Settings

For a TextBox control, the ScrollBars property settings are described in the following table.

Constant Setting Description
vbSBNone 0 (Default). None
vbHorizontal 1 Horizontal
vbVertical 2 Vertical
vbBoth 3 Both

Remarks

For a TextBox control with setting 1 (Horizontal), 2 (Vertical), or 3 (Both), you must set the MultiLine property to True.

At run time, the Microsoft Windows CE operating environment automatically implements a standard keyboard interface to allow navigation in TextBox controls with the arrow keys (UP ARROW, DOWN ARROW, LEFT ARROW, and RIGHT ARROW), the HOME and END keys, and so on.

Scroll bars are displayed on an object only if its contents extend beyond the object's borders. A vertical scroll bar appears on a TextBox control when it cannot display all of its lines of text. If ScrollBars is set to False, the object will not have scroll bars, regardless of its contents.