ScrollBars Enumeration
.NET Framework (current version)
Specifies which scroll bars will be visible on a control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
| Member name | Description | |
|---|---|---|
| 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.
.NET Framework
Available since 1.1
Available since 1.1
Show: