SelectionChange Committed event fires twice
Hi,
Please have a look at the following ComboBox behavior.
With the code below, if you click in the dropdown list with the mouse
to select an item , everything is fine.
But if you use the Enter key to select in the dropdown list, the
SelectionChange Committed event is fired twice.
How can I cancel the second event firing ?
Thanks
ML
'#### BEGIN CODE ############### ###
Private Sub FormTest_Load(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
ComboBox1.DropD ownStyle = ComboBoxStyle.D ropDownList
ComboBox1.Items .Add("My item 1")
ComboBox1.Items .Add("My item 2")
ComboBox1.Items .Add("My item 3")
End Sub
Private Sub ComboBox1_Selec tionChangeCommi tted(ByVal sender As
Object, ByVal e As System.EventArg s) Handles
ComboBox1.Selec tionChangeCommi tted
MsgBox("test")
End Sub
'#### END CODE ############### ###
Hi,
Please have a look at the following ComboBox behavior.
With the code below, if you click in the dropdown list with the mouse
to select an item , everything is fine.
But if you use the Enter key to select in the dropdown list, the
SelectionChange Committed event is fired twice.
How can I cancel the second event firing ?
Thanks
ML
'#### BEGIN CODE ############### ###
Private Sub FormTest_Load(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
ComboBox1.DropD ownStyle = ComboBoxStyle.D ropDownList
ComboBox1.Items .Add("My item 1")
ComboBox1.Items .Add("My item 2")
ComboBox1.Items .Add("My item 3")
End Sub
Private Sub ComboBox1_Selec tionChangeCommi tted(ByVal sender As
Object, ByVal e As System.EventArg s) Handles
ComboBox1.Selec tionChangeCommi tted
MsgBox("test")
End Sub
'#### END CODE ############### ###
Comment