C# combobox events

Hi there,
I have an editable combo box(style = dropdown); can anyone tell me what event fires when the user types in text into the combo as opposed to selecting one from the existing list please?
Is there a common event that works for both? The SelectedIndexChanged property didn't seem to fire for the text change.

Who is Participating?
alex_pavenConnect With a Mentor Commented:
Well, 'completed typing the text' sounds awfully vague :)
One option would be to simply wait until the focus leaves the control - then you know for sure; if however you need to provide some feedback before leaving the control, you can implement a timeout function: whenever the user types something, start a timer; if the user types something more before the timer is elapsed (with an interval of say 500-1000 ms), restart the timer; when the timer is elapsed, do your action (you can assume the user stopped typing because he's finished or waits for feedback).
As far as I know there's no event that does that; you'll need to handle the KeyDown event (or PreviewKeyDown) to detect when the user types. The SelectedIndexChanged is fired, I think, if the autocomplete source is set to ListItems and the user enters a string that fully matches one of the items. Other than that, you'll either need to handle the events separately or inherit the ComboBox in a class of your own and raise events how you see fit - however, note that it's illogical to fire SelectedIndexChanged when a key is pressed.
Ignis2Author Commented:
But is there any way of knowing when he has completed typing in the text? The textupdate event keeps firing in between!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.