ToolStripDropDownItem.DropDownClosed 이벤트

정의

ToolStripDropDown이 닫히면 발생합니다.

public:
 event EventHandler ^ DropDownClosed;
public event EventHandler DropDownClosed;
public event EventHandler? DropDownClosed;
member this.DropDownClosed : EventHandler 
Public Custom Event DropDownClosed As EventHandler 

이벤트 유형

예제

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

// This method handles the DropDownClosed event from a 
// ToolStripDropDownItem. It displays the value of the 
// item's Text property in the form's StatusStrip control.
void toolStripDropDownItem_DropDownClosed(object sender, EventArgs e)
{
    ToolStripDropDownItem item = sender as ToolStripDropDownItem;

    string msg = String.Format("Item closed: {0}", item.Text);
    this.toolStripStatusLabel1.Text = msg;
}
' This method handles the DropDownClosed event from a 
' ToolStripDropDownItem. It displays the value of the 
' item's Text property in the form's StatusStrip control.
 Private Sub toolStripDropDownItem_DropDownClosed(ByVal sender As Object, ByVal e As EventArgs)

     Dim item As ToolStripDropDownItem = CType(sender, ToolStripDropDownItem)

     Dim msg As String = String.Format("Item closed: {0}", item.Text)
     Me.toolStripStatusLabel1.Text = msg

 End Sub

설명

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

적용 대상