Thanks, using the postcommand option does the job but it still strikes me as odd that 
a menubutton which has been been activated by clicking on it doesn't generate a 
<ButtonPress> event.

Cam

On 11-11-26 02:37 PM, Michael Lange wrote:
Hi,

Thus spoketh Cam Farnell<ms...@bitflipper.ca>
unto us on Sat, 26 Nov 2011 12:54:09 -0400:

(..)

If the user clicks on Menubutton-A then the corresponding handler runs
as expected. If, without making a choice from menu A, the user then
clicks on Menubutton-B then - and this is the nub of the problem - the
handler bound to Menubutton-B does NOT run. If the user now clicks on
Menubutton-C, then the handler for B, yes B, runs.

Not sure, I guess this has something to do with the Menu's event-grabbing.
Maybe a better solution than binding to the Menubuttons is to use the
menu's postcommand option as in:

<snip>
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to