--- nfo/projects/netfraggle/bin/FraggleDialogModules.py 2004/09/01 21:43:30 1.2 +++ nfo/projects/netfraggle/bin/FraggleDialogModules.py 2004/09/04 20:26:01 1.3 @@ -2,6 +2,8 @@ from wxPython.wx import * +import FraggleCtlModules + def create(parent): return FraggleDialogModules(parent) @@ -12,23 +14,21 @@ class FraggleDialogModules(wxDialog): - def _init_utils(self): - # generated method, don't edit - pass - def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_FRAGGLEDIALOGMODULES, name='FraggleDialogModules', parent=prnt, pos=wxPoint(256, 167), - size=wxSize(189, 288), style=wxDEFAULT_DIALOG_STYLE, + size=wxSize(197, 315), style=wxDEFAULT_DIALOG_STYLE, title='Module Setup') - self._init_utils() self.SetClientSize(wxSize(189, 288)) self.checkListBoxModules = wxCheckListBox(choices=[], id=wxID_FRAGGLEDIALOGMODULESCHECKLISTBOXMODULES, name='checkListBoxModules', parent=self, pos=wxPoint(8, 8), size=wxSize(168, 248), style=0, validator=wxDefaultValidator) + EVT_CHECKLISTBOX(self.checkListBoxModules, + wxID_FRAGGLEDIALOGMODULESCHECKLISTBOXMODULES, + self.OnCheckListBoxModulesChecklistbox) self.buttonSaveClose = wxButton(id=wxID_FRAGGLEDIALOGMODULESBUTTONSAVECLOSE, label='Save and Close', name='buttonSaveClose', parent=self, @@ -38,6 +38,17 @@ label='Cancel', name='button1', parent=self, pos=wxPoint(104, 264), size=wxSize(72, 16), style=0) + def __init_listbox__(self,parent): + #print self.modulesCtl.modules.keys() + for i in self.modulesCtl.modules.keys(): + self.checkListBoxModules.Append(i) + def __init__(self, parent): + self.modulesCtl = parent.engine.modules self._init_ctrls(parent) - \ No newline at end of file + self.__init_listbox__(parent) + + def OnCheckListBoxModulesChecklistbox(self, event): + event.Skip() + +