ComboBox.DropDownClosed Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the drop-down list of the combo box closes.
public:
event EventHandler ^ DropDownClosed;
public event EventHandler DropDownClosed;
member this.DropDownClosed : EventHandler
Public Custom Event DropDownClosed As EventHandler
Event Type
Examples
The following example shows how to assign event handlers and how to handle the DropDownOpened and DropDownClosed events.
<ComboBox Name="cb" StaysOpenOnEdit="true" IsEditable="true" DropDownOpened="OnDropDownOpened"
DropDownClosed="OnDropDownClosed">
void OnDropDownOpened(object sender, EventArgs e)
{
if (cb.IsDropDownOpen == true)
{
cb.Text = "Combo box opened";
}
}
void OnDropDownClosed(object sender, EventArgs e)
{
if (cb.IsDropDownOpen == false)
{
cb.Text = "Combo box closed";
}
}
Private Sub OnDropDownOpened(ByVal Sender As Object, ByVal e As EventArgs)
If (cb.IsDropDownOpen = True) Then
cb.Text = "Combo box opened"
End If
End Sub
Private Sub OnDropDownClosed(ByVal Sender As Object, ByVal e As EventArgs)
If (cb.IsDropDownOpen = False) Then
cb.Text = "Combo box closed"
End If
End Sub
Applies to
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.