VisualStyleElement.ScrollBar.ThumbButtonVertical Osztály

Definíció

Objektumokat biztosít VisualStyleElement a függőleges görgetőmező minden állapotához (más néven a hüvelykujjhoz). Ez az osztály nem örökölhető.

public: ref class VisualStyleElement::ScrollBar::ThumbButtonVertical abstract sealed
public static class VisualStyleElement.ScrollBar.ThumbButtonVertical
type VisualStyleElement.ScrollBar.ThumbButtonVertical = class
Public Class VisualStyleElement.ScrollBar.ThumbButtonVertical
Öröklődés
VisualStyleElement.ScrollBar.ThumbButtonVertical

Példák

Az alábbi példakód bemutatja, hogyan hozhat létre egy VisualStyleRenderer tulajdonság által visszaadott VisualStyleElement kóddalNormal. A példa futtatásához illessze be egy Windows űrlapba. Kezelje az űrlap eseményét Paint , és hívja meg a DrawVisualStyleElementScrollBarThumbButtonVertical1 metódust az Paint eseménykezelési metódusból, és e adja át a következőt PaintEventArgs: .

public void DrawVisualStyleElementScrollBarThumbButtonVertical1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.ScrollBar.ThumbButtonVertical.Normal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.ScrollBar.ThumbButtonVertical.Normal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.ScrollBar.ThumbButtonVertical.Normal",
             this.Font, Brushes.Black, new Point(10, 10));
    }
    else
        e.Graphics.DrawString("This element is not defined in the current visual style.",
             this.Font, Brushes.Black, new Point(10, 10));
}
Public Sub DrawVisualStyleElementScrollBarThumbButtonVertical1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.ScrollBar.ThumbButtonVertical.Normal)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.ScrollBar.ThumbButtonVertical.Normal)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.ScrollBar.ThumbButtonVertical.Normal", _
          Me.Font, Brushes.Black, New Point(10, 10))
    Else
        e.Graphics.DrawString("This element is not defined in the current visual style.", _
          Me.Font, Brushes.Black, New Point(10, 10))
    End If
End Sub

Megjegyzések

Az osztály minden tulajdonsága VisualStyleElement.ScrollBar.ThumbButtonVertical egy függőleges görgetőmező eltérő állapotát adja vissza VisualStyleElement .

Tulajdonságok

Name Description
Disabled

Lekéri a letiltott állapotban lévő függőleges görgetőmezőt ábrázoló vizuális stíluselemet.

Hot

Lekéri azokat a vizuális stíluselemeket, amelyek egy függőleges görgetőmezőt jelölnek a gyakori elérésű állapotban.

Normal

Lekéri a normál állapotú függőleges görgetőmezőt ábrázoló vizuális stíluselemet.

Pressed

Lekéri a lenyomott állapotban lévő függőleges görgetőmezőt ábrázoló vizuális stíluselemet.

A következőre érvényes:

Lásd még