I am working on VS 2010 with VB using the .NET Framework 4.0
I have a combobox . It has some elements and it displays just fine. Here where it gets a little weird:
If I click the dropdown arrow on combobox and CLICK on the item I want, SelectedIndexChanged is called - fine.
If I click inside the combobox text area and start typing what I want and end it by pressing the up (or down) key called SelectedIndexChanged is fine too.
If I click the drop-down arrow on combobox and start typing what I want and end it by pressing ENTER, SelectedIndexChanged not called - PROBLEM.
Is there any other event triggered by ENTER in the latter case? I tried using the TextChanged and TextUpdate , but they don't seem to work:
Private Sub cmbStatus_TextChanged(sender As System.Object, e As System.EventArgs) Handles cmbStatus.TextChanged If e.Equals(Keys.Enter) Then Call SomeMethod() End If
Should I use something other than e.Equals(Keys.Enter) ?
Is there any other event that I should look for?
EDIT: Example elements in a combobox :
- 10 - CHECKING NEW ENTRANCE AND COMPLETENESS
---> this is the most common type - 13 - TRB / HRB ASSIGNED
---> there are a few with '/' - 60 - EXTERNAL (KEEP ADDITIONAL NOTICE)
---> there are a few with '(' and ')'
In principle, the type of each list is "## - SOME TEXT".
redhotspike
source share