PanelStyle.ScrollBars Property

Gets or sets the visibility and position of scroll bars in a panel control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public:
virtual property ScrollBars ScrollBars {
	ScrollBars get ();
	void set (ScrollBars value);
}
/** @property */
public ScrollBars get_ScrollBars ()

/** @property */
public void set_ScrollBars (ScrollBars value)

public function get ScrollBars () : ScrollBars

public function set ScrollBars (value : ScrollBars)

Not applicable.

Property Value

One of the ScrollBars values. The default is None.

Exception typeCondition

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.

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

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: