VisualStyleElement.ComboBox.DropDownButton Sınıf

Tanım

VisualStyleElement Birleşik giriş kutusu denetiminin açılan okunun farklı durumları için nesneler sağlar. Bu sınıf devralınamaz.

public: ref class VisualStyleElement::ComboBox::DropDownButton abstract sealed
public static class VisualStyleElement.ComboBox.DropDownButton
type VisualStyleElement.ComboBox.DropDownButton = class
Public Class VisualStyleElement.ComboBox.DropDownButton
Devralma
VisualStyleElement.ComboBox.DropDownButton

Örnekler

Aşağıdaki kod örneği, özelliği tarafından Hot döndürülen ile VisualStyleElement nasıl oluşturulacağını VisualStyleRenderer gösterir. Bu örneği çalıştırmak için windows formuna yapıştırın. Formun Paint olayını işleyip olarak geçirerek olay işleme yönteminden Paint yöntemini çağırın eDrawVisualStyleElement_Button_DropDownButton2PaintEventArgs.

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

Açıklamalar

sınıfının her özelliği VisualStyleElement.ComboBox.DropDownButton , birleşik giriş kutusu denetiminin açılan okunun farklı bir durumu için bir VisualStyleElement döndürür.

Özellikler

Disabled

Devre dışı durumdaki bir açılan oku temsil eden görsel stil öğesini alır.

Hot

Etkin durumdaki bir açılan oku temsil eden görsel stil öğesini alır.

Normal

Normal durumdaki bir açılan oku temsil eden görsel stil öğesini alır.

Pressed

Basılan durumdaki bir açılan oku temsil eden görsel stil öğesini alır.

Şunlara uygulanır

Ayrıca bkz.