ScrollBars Enumeration


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

Both horizontal and vertical scroll bars are shown.


Only horizontal scroll bars are shown.


No scroll bars are shown.


Only 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
Available since 1.1
Return to top