<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2722" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The code I'm using for the option menu is the
following:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>OPTIONS =
["en","pt","es","it","fr","de"]<BR>self.startw.variable =
StringVar()<BR>self.startw.variable.set(OPTIONS[0]) # default
value<BR>self.startw.whis_butt=apply(OptionMenu, (self.startw,
self.startw.variable) + tuple(OPTIONS))<BR>self.startw.whis_butt.grid(column=1,
row=3)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Now I'd like to have a function like:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>def onChange(self):</FONT></DIV>
<DIV><FONT face=Arial size=2> # do optionmenu specific
stuff</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>but can't find how to do it, how to associate/bind
onChange with the optionmenu widget.</FONT></DIV>
<DIV><FONT face=Arial size=2>Any help will be highly appreciated.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Chrs</FONT></DIV>
<DIV><FONT face=Arial size=2>j</FONT></DIV></BODY></HTML>