I have a combobox with some useful items. Operators can select items from this list. I also want to make it possible that the operator types some text that is not in the selection list.
If the operator indicates that he finished editing the textbox, for instance by pressing enter, I want to check if the operator selected an item, or typed some new text.
From Best way to get selected item OR entered text from combobox I learned that I can read the textbox text like this:
var operatorText = comboBox1.Txt;
But what event should I use?
- SelectedIndexChanged is not raised if I type some text and press enter
- TextUpdate is raised for every character that the operator types, but not if he presses enter
- TestUpdated is raised for every character change, even after selections, but not if enter is pressed.
I hear a "ding" when I press enter after editing the textbox, so some event should occur, but which one?