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
Both

Both horizontal and vertical scroll bars are shown.

Horizontal

Only horizontal scroll bars are shown.

None

No scroll bars are shown.

Vertical

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
Show: