VisualStyleElement.ComboBox.DropDownButton.Pressed 속성

정의

누름 상태의 드롭다운 화살표를 나타내는 비주얼 스타일 요소를 가져옵니다.Gets a visual style element that represents a drop-down arrow in the pressed state.

public:
 static property System::Windows::Forms::VisualStyles::VisualStyleElement ^ Pressed { System::Windows::Forms::VisualStyles::VisualStyleElement ^ get(); };
public static System.Windows.Forms.VisualStyles.VisualStyleElement Pressed { get; }
member this.Pressed : System.Windows.Forms.VisualStyles.VisualStyleElement
Public Shared ReadOnly Property Pressed As VisualStyleElement

속성 값

누름 상태의 드롭다운 화살표를 나타내는 VisualStyleElement입니다.A VisualStyleElement that represents a drop-down arrow in the pressed state.

예제

다음 코드 예제에는 만드는 방법을 보여 줍니다는 VisualStyleRenderer 사용 하 여 합니다 VisualStyleElement 반환한는 Pressed 속성입니다.The following code example demonstrates how to create a VisualStyleRenderer with the VisualStyleElement returned by the Pressed property. 이 예제를 실행 하려면 Windows 폼에 붙여 넣습니다.To run this example, paste it into a Windows Form. 양식의 처리 Paint 이벤트 및 호출 합니다 DrawVisualStyleElement_Button_DropDownButton3 메서드에서 Paint 전달 하는 이벤트 처리 메서드를 e 으로 PaintEventArgs입니다.Handle the form's Paint event and call the DrawVisualStyleElement_Button_DropDownButton3 method from the Paint event-handling method, passing e as PaintEventArgs.

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

설명

사용할 수는 VisualStyleElement 반환한 합니다 Pressed 만들 속성을 VisualStyleRenderer합니다.You can use the VisualStyleElement returned by the Pressed property to create a VisualStyleRenderer.

적용 대상