I have a combobox control on the form. When the user makes a change, I want
to validate a condition before permitting the change. If the condition is
not met, I want to return the ComboBox text back to its previous value. He
is what I tried.
(1) Validating event does not work because user is not exiting the control.
(2) My condition testing code is in the SelectedIndexChanged event.
Unfortunately I can't find a way to recover the previous value if test fails.
(3) There is no .....changing event that I can use that supports e.cancel =
True. (4) My best thought is to set a class variable in the mouseDown event
to capture the current value and use that class variable in the
SelectedIndexChanged event if the condition test fails.
One would think there is an easier way than my #4 method but I can't find
it. Any alternative approach to this problem will be appreciated.