saving Tix ComboBox dropdowns

gcash gcash at luncheonmeat.cfl.rr.com
Mon Dec 30 01:02:42 EST 2002


I'm using the ComboBox from the 2.2.2 Tix module.  I'd like to make a
subclass that's persistant and can save the contents of the dropdown list.

I know that's the "listbox" subcomponent of the "slistbox" component,
i.e. I can do a cb.slistbox.listbox.get(0, 'end') to get the current list.
That's the easy part.

What I can't figure out is what kind of event to capture that will tell me
when this list is updated.  

If I try to use "<Destroy>" then the subcomponents seem to no longer exist,
and I've even tried binding to the "<Destroy>" event on the individual
subcomponents.

If I try to use "<FocusOut>" then most of the time the newest entry isn't
in there.  I've also tried saving during the "browsecmd", "listcmd", and
"command" callbacks, and run into the same problem.  I've looked at the
ComboBox.tcl code and it's some sort of state machine, but I'm pretty much
TCL-illiterate so it doesn't make sense to me.

Any ideas???

-gc

-- 
The Password that can be written down is not the true Password.



More information about the Python-list mailing list