[wxPython] Problem with wxDialog on windows

I wrote a little widget "wxToggleListDialog" that works fine on Linux but
blocs on windows.

There are two problems.

class wxToggleListDialog(wxDialog):
    def __init__(self, parent, ID, title, itemList, stateList,
toggleCallback, okCallback):
        wxDialog.__init__(self, parent, -1, title, style=wxDIALOG_MODAL |
wxTHICK_FRAME)
        print title
        self.CaptureMouse()

When the dialog has the mouse captured that means that no other window
(including the buttons) can get a mouse click. Take this out.

        self.okCallback = okCallback
        self.box = wxBoxSizer(wxVERTICAL)
        self.box2 = wxBoxSizer(wxHORIZONTAL)
        self.itemList = itemList
        self.toggleCallback = toggleCallback

        self.panel = wxPanel(self, -1, size=(230,300))

You create this panel but never use it. It is interfering somehow with the
buttons. It's not needed on a wxDialog so you can take out this line too.

···

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