PanelStyle::ScrollBars Property
Gets or sets the visibility and position of scroll bars in a panel control.
Assembly: System.Web (in System.Web.dll)
public: virtual property ScrollBars ScrollBars { ScrollBars get (); void set (ScrollBars value); }
Property Value
Type: System.Web.UI.WebControls::ScrollBarsOne of the ScrollBars values. The default is None.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The ScrollBars property is not one of the ScrollBars values. |
The ScrollBars property specifies the visibility and position of scroll bars in a panel control.
The ScrollBars property is set using one of the ScrollBars enumeration values. The following table lists the possible values.
Value | Description |
|---|---|
None | No scroll bars are shown. |
Horizontal | Only a horizontal scroll bar is shown. |
Vertical | Only a vertical scroll bar is shown. |
Both | Both horizontal and vertical scroll bars are shown. |
Auto | If necessary, horizontal, vertical, or both scroll bars are shown. Otherwise, no scroll bars are shown. |
The following code example sets the ScrollBars properties of two panel controls, Panel1 and Panel2, to the ScrollBars.Both enumeration value. This code example is part of a larger example provided for the PanelStyle class.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.