SelectedIndexChanged not firing on mouse click

  • Thread starter Thread starter Evan Stone
  • Start date Start date
E

Evan Stone

I'm running into a strange problem (or at least it seems strange to me). I
have a standard list box (System.Windows.Form.ListBox) on a form and I'm
trying to trap for activity on the SelectedIndexChanged event. It works fine
if you change the selected item via the keyboard (arrow keys), but if you
click on a different item, the SelectedIndexChanged event is not getting
fired.

Has anyone else experienced this weird behavior? If so, is there a solution?
Or am I just looking in the wrong place and should be concentrating on a
different event?

Thanks!

evan stone | software engineer
 
I believe so, yes. As it turns out, I _am_ doing a DoDragDrop call in the
MouseDown event, so that must be the problem.

Unfortunately, there's no real solution contained in that thread, and the
Syncfusion article referenced is a dead link.

If anyone has any further suggestions or information I'd appreciate it...
Or, I may just not worry about doing anything on the SelectedIndexChanged
event after all, if there's no easy(ish) solution.

Thanks!

evan stone | software engineer
 
Back
Top