I've created a dialog that simply shows some choices in a
wxCheckListBox. However, when I click on a check box, an Information
Dialog pops up that shows the item index and the XY position. Where
does this dialog come from and how to I surpress it?
chris
class wxMultiCheckBoxDlg(wxDialog):
""""""
def __init__(self,parent,opts,text,caption,pos=wxDefaultPosition):
wxDialog.__init__(self,parent,-1,caption,pos,wxDefaultSize)
sizers = { 'ctrls' : wxBoxSizer(wxVERTICAL),
'buttons' : wxBoxSizer(wxHORIZONTAL) }
sid = wxNewId()
self.opts = opts
self.list = wxCheckListBox(self, sid, wxDefaultPosition,
wxDefaultSize,opts)
sizers['ctrls'].Add(wxStaticText(self, -1, text), 0, 0)
sizers['ctrls'].Add(10,10)
sizers['ctrls'].Add(self.list, 1, wxEXPAND)
sizers['buttons'].Add(wxButton(self, wxID_OK, "OK"), 1,
wxEXPAND)
sizers['buttons'].Add(10,10)
sizers['buttons'].Add(wxButton(self, wxID_CANCEL, "Cancel"), 1,
wxEXPAND)
width = 200
height = 200
self.SetClientSizeWH(width,height)
sizers['ctrls'].SetDimension(10,5,width-20,160)
sizers['buttons'].SetDimension(10,170,width-20,25)
EVT_BUTTON(self, wxID_OK, self.on_ok)
def on_ok(self,evt):
checked = []
for i in range(len(self.opts)):
if self.IsChecked(i):
checked.append(i)
self.checked = checked
self.EndModal(wxID_OK)
def get_selections(self,ok):
return self.checked
···
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users