wxpython: problem with events and checklistbox
Jeff Shannon
jeff at ccvcorp.com
Tue Apr 2 17:17:12 EST 2002
In article <3caa2be5.48482250 at news.easynews.net>, stojek at part-
gmbh.de says...
> HI,
>
> in my GUI I have a wxCheckListBox (named CheckList) and an fuction
> IfChecked(self,event) that process the checkevents (EVT_CHECLISTBOX).
>
> Now, when unpickling all data at the start of my program,
> I want to check some items with CheckList.check(index,true)
> My problem is, that after each checking the function IfChecked is
> called.
If I'm understanding your problem correctly (you don't want to
call the usual handler while you're unpickling), then the quick
solution would be to delay calling EVT_CHECKLISTBOX() until after
you've unpickled things. At that point, no handler will be
registered; once the item is unpickled, register the handler in
the usual way (by calling the EVT_* function).
Of course, determining when it's safe for you to register the
handler, and making it work both for new instances and unpickled
instances, is up to you... ;)
--
Jeff Shannon
Technician/Programmer
Credit International
More information about the Python-list
mailing list