[Tkinter-discuss] How do I identify which menu item has bee selected?

thicket mark_eastwood at ntlworld.com
Thu Aug 20 01:42:01 CEST 2009

Sorry my fault - have not explained it well - what I mean is the 'variable'
coption that is available in add_checkbutton() and
add_radiobutton() but not in add_cascade().

It is through the use of the 'variable' coption that the month selected is
determined - knowing the month that has been selected is crucial in
determining which function to run. I could not see a way of using a cascaded
menu and still determine the month selected.

Having said that - seeing the way that you have written your code (I must
say I do like!) - I reckon I've been approaching this from the wrong angle
and am fairly sure that I can adapt it to what I need - this I'll do. 

There is always the option to simplify it all e.g. include a menubutton on
the menubar from which a month can be selected then run all 'actions'
against that month - though not as flexible from a user perspective.

Will work on what you have shown me.

View this message in context: http://www.nabble.com/How-do-I-identify-which-menu-item-has-bee-selected--tp25023156p25053797.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.

More information about the Tkinter-discuss mailing list