[Tutor] Event handler for optionmenu
Jorge Louis De Castro
jorge at bcs.org.uk
Mon Aug 15 11:18:26 CEST 2005
I have an optionmenu widget that works just fine except that can't find docs to get hold of events as they happen, kinda like the command=XYZ of other widgets like buttons.
The code I'm using for the option menu is the following:
OPTIONS = ["en","pt","es","it","fr","de"]
self.startw.variable = StringVar()
self.startw.variable.set(OPTIONS) # default value
self.startw.whis_butt=apply(OptionMenu, (self.startw, self.startw.variable) + tuple(OPTIONS))
Now I'd like to have a function like:
# do optionmenu specific stuff
but can't find how to do it, how to associate/bind onChange with the optionmenu widget.
Any help will be highly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor