Cancel listbox click

  • Thread starter Thread starter JP
  • Start date Start date
J

JP

Is there anyway to cancel a click (keep listbox from changing) from code.

If the current data is not saved, I want an opportunity to save the current
data before switching.

I tried putting code in the listBox1_SelectedIndexChanged but the index has
already changed.

thanks
 
Hi JP,
I think that I don't understand it well, but:
Is there anyway to cancel a click (keep listbox from changing) from code.

If the current data is not saved, I want an opportunity to save the current
data before switching.

Maybye you are looking for the "mousedown" event.

Cor
 
Hi JP,

Yes. Make a note of the current index in MouseDown.

Regards,
Fergus
 

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

Back
Top