Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ScrollBars Enumeration
Collapse the table of content
Expand the table of content

ScrollBars Enumeration

Specifies which scroll bars will be visible on a control.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

type ScrollBars

Member nameDescription
BothBoth horizontal and vertical scroll bars are shown.
HorizontalOnly horizontal scroll bars are shown.
NoneNo scroll bars are shown.
VerticalOnly vertical scroll bars are shown.

This enumeration is used by TextBox.ScrollBars.

Not all controls support scroll bars. Use this enumeration to specify which scroll bars will be visible on a control, either under some or all circumstances.

The following code example demonstrates how to use the ScrollBars enumeration.To run the example, paste the following code in a form. Call the SetFourDifferentScrollBars method in the form's constructor or Load event-handling method.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft