ToolStripDropDownItem.DropDownItemClicked 이벤트

정의

ToolStripDropDown을 클릭하면 발생합니다.

public:
 event System::Windows::Forms::ToolStripItemClickedEventHandler ^ DropDownItemClicked;
public event System.Windows.Forms.ToolStripItemClickedEventHandler DropDownItemClicked;
public event System.Windows.Forms.ToolStripItemClickedEventHandler? DropDownItemClicked;
member this.DropDownItemClicked : System.Windows.Forms.ToolStripItemClickedEventHandler 
Public Custom Event DropDownItemClicked As ToolStripItemClickedEventHandler 

이벤트 유형

예제

다음 코드 예제에서는 여러 ToolStripDropDownItem 컨트롤에 DropDownItemClicked 대 한 이벤트를 처리 하는 방법을 보여 줍니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 ToolStripDropDownItem 클래스입니다.

// This method handles the DropDownItemClicked event from a 
// ToolStripDropDownItem. It displays the value of the clicked
// item's Text property in the form's StatusStrip control.
void toolStripDropDownItem_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
    string msg = String.Format("Item clicked: {0}", e.ClickedItem.Text);
    this.toolStripStatusLabel1.Text = msg;
}
' This method handles the DropDownItemClicked event from a 
' ToolStripDropDownItem. It displays the value of the clicked
' item's Text property in the form's StatusStrip control.
 Private Sub toolStripDropDownItem_DropDownItemClicked( _
 ByVal sender As Object, _
 ByVal e As ToolStripItemClickedEventArgs)

     Dim msg As String = String.Format("Item clicked: {0}", e.ClickedItem.Text)
     Me.toolStripStatusLabel1.Text = msg

 End Sub

설명

이벤트 처리에 대한 자세한 내용은 이벤트 처리 및 발생 을 참조하십시오.

적용 대상