Python/tkinter: Bind To Event Related To Currently Selected Menu Item
Wondering if there's a menu event I can bind to that's related to the currently selected menu item? By menu item I mean the items that show up in a popup menu like New, Open, Save,
Solution 1:
You need to bind to the <<MenuSelect>>
event.
Solution 2:
There's an <Enter>
event that is triggered when the mouse pointer enters a widget's space. Depending on how you're building your menu, you may be able to use it.
See http://www.pythonware.com/library/tkinter/introduction/events-and-bindings.htm for more
Post a Comment for "Python/tkinter: Bind To Event Related To Currently Selected Menu Item"