This property returns and sets a value that indicates whether an object has horizontal or vertical scroll bars.
object.ScrollBars
The following table shows the settings for the ScrollBars property for a TextBox control.
Constant |
Setting |
Description |
vbSBNone | 0 (default) | None |
vbHorizontal | 1 | Horizontal |
vbVertical | 2 | Vertical |
vbBoth | 3 | Both |
The ScrollBars property is read-only at run time.
For a TextBox control with setting 1 (Horizontal), 2 (Vertical), or 3 (Both), you must set the MultiLine property to True.
At run time, Windows CE automatically implements a standard keyboard interface to enable navigation in TextBox controls with the arrow keys, the HOME and END keys, and so on.
Scroll bars are displayed on an object only if the objects contents extend beyond the object's borders. A vertical scroll bar appears on a TextBox control when it cannot display all its lines of text. If ScrollBars is set to False, the object will not have scroll bars, regardless of its contents.