ComboBox text change event notification

  • Thread starter Thread starter zfeld
  • Start date Start date
Z

zfeld

I need an event notification when the user types anything in the combobox
textfield? I know about the TextChanged Event but the problem is this is
also fired when the user selects an item in the combobox which updates the
textfield, and there is no way of knowing what fired the event other then
that it came from the combobox.

I am guessing the only way to do this would involve the keyup & keydown
events.
How about if the user pastes something into the field. What would notify me
of this? Other then the TextChanged Event which as explained above will not
help me.
 
What if you set a flag if SelectedIndexChanged is triggered, and ignore
TextChanged if flag is set?
But Iam not sure in which event is fired first.
But the question is why do you want to distinguish between
SelectedIndexChanged and TextChanged?
Would it be enough to determine whether the current text in the editbox is
contained in the dropdown list?
 
Back
Top