ComboBox Changing?

C

Chris S

Hi, I was hoping to catch an event when a ComboBox is changing, then prompt
the user indide the event's code, and if the user cancels, then I want to
cancel the change in the combo, something like Cancel = True, but the combo
events like "SelectedIndexChanged" don't fire with a parameter that
resembles something that can be canceled.

Thanks.
 
H

Herfried K. Wagner [MVP]

* "Chris S said:
Hi, I was hoping to catch an event when a ComboBox is changing, then prompt
the user indide the event's code, and if the user cancels, then I want to
cancel the change in the combo, something like Cancel = True, but the combo
events like "SelectedIndexChanged" don't fire with a parameter that
resembles something that can be canceled.

You will have to store the old value whenever 'SelectedIndexChanged' is
raised. Later you can use this value to reset the selection to if the
user wants to cancel the change.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top