VisualStyleElement.ScrollBar.RightTrackHorizontal Třída

Definice

Poskytuje VisualStyleElement objekty pro každý stav pravé části vodorovného posuvníku stopy. Tuto třídu nelze dědit.

public: ref class VisualStyleElement::ScrollBar::RightTrackHorizontal abstract sealed
public static class VisualStyleElement.ScrollBar.RightTrackHorizontal
type VisualStyleElement.ScrollBar.RightTrackHorizontal = class
Public Class VisualStyleElement.ScrollBar.RightTrackHorizontal
Dědičnost
VisualStyleElement.ScrollBar.RightTrackHorizontal

Příklady

Následující příklad kódu ukazuje, jak vytvořit VisualStyleRenderer s VisualStyleElement vrácenou Normal vlastností . Pokud chcete spustit tento příklad, vložte ho do formuláře Windows Form. Zpracujte Paint událost formuláře a zavolejte metodu DrawVisualStyleElementScrollBarRightTrackHorizontal1Paint z metody zpracování událostí a předejte e ji jako PaintEventArgs.

public void DrawVisualStyleElementScrollBarRightTrackHorizontal1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.ScrollBar.RightTrackHorizontal.Normal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.ScrollBar.RightTrackHorizontal.Normal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.ScrollBar.RightTrackHorizontal.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 DrawVisualStyleElementScrollBarRightTrackHorizontal1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.ScrollBar.RightTrackHorizontal.Normal)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.ScrollBar.RightTrackHorizontal.Normal)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.ScrollBar.RightTrackHorizontal.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

Poznámky

Každá vlastnost VisualStyleElement.ScrollBar.RightTrackHorizontal třídy vrátí VisualStyleElement pro jiný stav stopy vodorovného posuvníku napravo od posuvníku (označuje se také jako palec).

Vlastnosti

Disabled

Získá vizuální styl prvek, který představuje pravou část vodorovného posuvníku stopy v zakázaném stavu.

Hot

Získá vizuální styl prvek, který představuje pravou část vodorovného posuvníku stopy v horkém stavu.

Normal

Získá vizuální styl prvek, který představuje pravou část vodorovného posuvníku stopy v normálním stavu.

Pressed

Získá vizuální styl prvek, který představuje pravou část vodorovného posuvníku stopy ve stisknutém stavu.

Platí pro

Viz také