ScrollBars (Grid)

Returns or sets a value that determines whether a Grid has horizontal and/or vertical scroll bars.

Syntax

object.ScrollBars [= value ]

The ScrollBars property syntax has these parts:

Part Description
object An object expression that evaluates to an object.
value Integer or constant specifying the type of scrollbars, as described in Settings.

Settings

The settings for value are:

Value Description
0 None
1 Horizontal
2 Vertical
3 Both

Remarks

Scroll bars appear on a Grid only if its contents extend beyond the Grid control's borders. For example, a vertical scroll bar appears when Grid can't display all of its rows. If ScrollBars is set to False, Grid will not have scroll bars, regardless of its contents.

Note that if Grid has no scroll bars in either direction, it will not allow any scrolling in that direction, even if the user uses the keyboard to select a cell that is off the visible area of the control.