PanelStyle.ScrollBars Eigenschap

Definitie

Hiermee haalt u de zichtbaarheid en positie van schuifbalken in een configuratiescherm op of stelt u deze in.

public:
 virtual property System::Web::UI::WebControls::ScrollBars ScrollBars { System::Web::UI::WebControls::ScrollBars get(); void set(System::Web::UI::WebControls::ScrollBars value); };
public virtual System.Web.UI.WebControls.ScrollBars ScrollBars { get; set; }
member this.ScrollBars : System.Web.UI.WebControls.ScrollBars with get, set
Public Overridable Property ScrollBars As ScrollBars

Waarde van eigenschap

Een van de ScrollBars waarden. De standaardwaarde is None.

Uitzonderingen

De ScrollBars eigenschap is geen van de ScrollBars waarden.

Voorbeelden

In het volgende codevoorbeeld worden de ScrollBars eigenschappen van twee paneelbesturingselementen Panel1 ingesteld en Panel2op de ScrollBars.Both opsommingswaarde. Dit codevoorbeeld maakt deel uit van een groter voorbeeld voor de PanelStyle klasse.

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); 
    }
}
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

Opmerkingen

De ScrollBars eigenschap geeft de zichtbaarheid en positie van schuifbalken op in een configuratiescherm.

De ScrollBars eigenschap wordt ingesteld met behulp van een van de ScrollBars opsommingswaarden. De volgende tabel bevat de mogelijke waarden.

Waarde Beschrijving
None Er worden geen schuifbalken weergegeven.
Horizontal Er wordt alleen een horizontale schuifbalk weergegeven.
Vertical Er wordt alleen een verticale schuifbalk weergegeven.
Both Zowel horizontale als verticale schuifbalken worden weergegeven.
Auto Indien nodig worden horizontale, verticale of beide schuifbalken weergegeven. Anders worden er geen schuifbalken weergegeven.

Van toepassing op

Zie ook