SingleChoiceDialog and Grids

I am writing a GUI that contains a 99x3 wxGrid and also several instances of the SingleChoiceDialog. Right mouse clicking in any of the grid columns will pop up a SingleChoiceDialog. If the user double clicks the selection in the SingleChoiceDialog instead of single clicking and clicking on 'OK', the next time the third column (and only the third column) is right clicked the SingleChoiceDialog comes up and immediately goes away. It is like the double click is still in an event queue and satisifes the SingleChoiceDialog before a choice is really made.
   This seems to only effect the third column of my wxGrid and oddly enough, only rows 5 and greater. Double clicking on a SingleChoiceDialog launched outside of the wxGrid also causes the problem.
  Any ideas? Do I need to flush the event queue???

Thanks.

Sidorovich, Walter V. USNUNK NAVAIR wrote:

  I am writing a GUI that contains a 99x3 wxGrid and also several instances of the SingleChoiceDialog. Right mouse clicking in any of the grid columns will pop up a SingleChoiceDialog. If the user double clicks the selection in the SingleChoiceDialog instead of single clicking and clicking on 'OK', the next time the third column (and only the third column) is right clicked the SingleChoiceDialog comes up and immediately goes away. It is like the double click is still in an event queue and satisifes the SingleChoiceDialog before a choice is really made.
   This seems to only effect the third column of my wxGrid and oddly enough, only rows 5 and greater. Double clicking on a SingleChoiceDialog launched outside of the wxGrid also causes the problem.
  Any ideas? Do I need to flush the event queue???

There may be a mouse-up event or something left over after the dialog is
dismissed. I've also seen this when double clicking in a file dialog
over some other window that is mouse sensitive, but I've never really
looked for a workaround. You may be able to set a flag after you get
back from the ShowModal and then hook EVT_MOUSE and check if the flag is
set, if so just clear the flag otherwise call event.Skip and let the
default handlers process the event.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!