PanelStyle.ScrollBars プロパティ
アセンブリ: System.Web (system.web.dll 内)

Dim instance As PanelStyle Dim value As ScrollBars value = instance.ScrollBars instance.ScrollBars = value
/** @property */ public ScrollBars get_ScrollBars () /** @property */ public void set_ScrollBars (ScrollBars value)
ScrollBars 値の 1 つ。既定値は None です。

ScrollBars プロパティは、パネル コントロールのスクロール バーの表示状態と位置を指定します。
ScrollBars プロパティは、ScrollBars 列挙値の 1 つを使用して設定します。有効値の一覧を次の表に示します。

Panel1 と Panel2 の 2 つのパネル コントロールの ScrollBars プロパティに、ScrollBars.Both 列挙値を設定するコード例を次に示します。このコード例は、PanelStyle クラスのトピックで取り上げているコード例の一部分です。
Partial Class PanelStylevb_aspx Inherits Page Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Dim panelState As StateBag = New StateBag() Dim myPanelStyle As PanelStyle = New PanelStyle(panelState) ' Set the properties of the PanelStyle class. myPanelStyle.HorizontalAlign = HorizontalAlign.Center myPanelStyle.ScrollBars = ScrollBars.Both myPanelStyle.Wrap = False myPanelStyle.Direction = ContentDirection.LeftToRight myPanelStyle.BackImageUrl = "~\images\picture.jpg" ' Use the ApplyStyle method of the Panel control to apply ' the settings from the myPanelStyle object. Panel1.ApplyStyle(myPanelStyle) Panel2.ApplyStyle(myPanelStyle) End Sub End Class
public partial class PanelStylecs_aspx : Page { void Page_Load(object sender, EventArgs e) { StateBag panelState = new StateBag(); PanelStyle myPanelStyle = new PanelStyle(panelState); // Set the properties of the PanelStyle class. myPanelStyle.HorizontalAlign = HorizontalAlign.Center; myPanelStyle.ScrollBars = ScrollBars.Both; myPanelStyle.Wrap = false; myPanelStyle.Direction = ContentDirection.LeftToRight; myPanelStyle.BackImageUrl = @"~\images\picture.jpg"; // Use the ApplyStyle method of the Panel control to apply // the settings from the myPanelStyle object. Panel1.ApplyStyle(myPanelStyle); Panel2.ApplyStyle(myPanelStyle); } }

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- PanelStyle.ScrollBars プロパティのページへのリンク