VisualStyleElement.ComboBox.DropDownButton Osztály

Definíció

Objektumokat biztosít VisualStyleElement a kombinált lista vezérlőelem legördülő nyílának különböző állapotához. Ez az osztály nem örökölhető.

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

Példák

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

public void DrawVisualStyleElement_ComboBox_DropDownButton2(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.ComboBox.DropDownButton.Hot))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.ComboBox.DropDownButton.Hot);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.ComboBox.DropDownButton.Hot",
             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 DrawVisualStyleElement_ComboBox_DropDownButton2(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.ComboBox.DropDownButton.Hot)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.ComboBox.DropDownButton.Hot)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.ComboBox.DropDownButton.Hot", _
          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.ComboBox.DropDownButton a kombinált lista vezérlőelem legördülő nyílának egy másik állapotát adja vissza VisualStyleElement .

Tulajdonságok

Name Description
Disabled

Lekéri a letiltott állapotban lévő legördülő nyílra mutató vizuális stíluselemet.

Hot

Lekéri azt a vizuális stíluselemet, amely egy legördülő nyilat jelöl a gyakori elérésű állapotban.

Normal

Lekéri a normál állapotban lévő legördülő nyílra mutató vizuális stíluselemet.

Pressed

Lekéri a lenyomott állapotban lévő legördülő nyílra mutató vizuális stíluselemet.

A következőre érvényes:

Lásd még