PanelStyle.ScrollBars Özellik

Tanım

Panel denetiminde kaydırma çubuklarının görünürlüğünü ve konumunu alır veya ayarlar.

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

Özellik Değeri

ScrollBars

Değerlerden ScrollBars biri. Varsayılan değer: None.

Özel durumlar

ScrollBars özelliği değerlerden ScrollBars biri değildir.

Örnekler

Aşağıdaki kod örneği, Panel1 ve Panel2olmak üzere iki panel denetiminin ScrollBars.Both özelliklerini numaralandırma değerine ayarlarScrollBars. Bu kod örneği, sınıfı için PanelStyle sağlanan daha büyük bir örneğin parçasıdır.

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

Açıklamalar

özelliği, ScrollBars bir panel denetimindeki kaydırma çubuklarının görünürlüğünü ve konumunu belirtir.

ScrollBars özelliği, numaralandırma değerlerinden ScrollBars biri kullanılarak ayarlanır. Aşağıdaki tabloda olası değerler listelemektedir.

Değer Açıklama
None Kaydırma çubuğu gösterilmez.
Horizontal Yalnızca yatay kaydırma çubuğu gösterilir.
Vertical Yalnızca dikey kaydırma çubuğu gösterilir.
Both Hem yatay hem de dikey kaydırma çubukları gösterilir.
Auto Gerekirse yatay, dikey veya her iki kaydırma çubuğu da gösterilir. Aksi takdirde kaydırma çubuğu gösterilmez.

Şunlara uygulanır

Ayrıca bkz.