Python/Tkinter:绑定到与当前所选菜单项相关的事件 [英] Python/Tkinter: bind to event related to currently selected menu item

查看:686
本文介绍了Python/Tkinter:绑定到与当前所选菜单项相关的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想知道是否可以绑定到与当前所选菜单项有关的菜单事件吗?菜单项是指出现在弹出菜单中的项,例如新建",打开",保存"等.

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, etc.

用例:我想用当前所选菜单项的描述更新我们应用程序的状态栏区域.

Use case: I would like to update a statusbar area of our application with a description of the currently selected menu item.

任何想法都值得赞赏.

谢谢你, 马尔科姆

推荐答案

您需要绑定到<<MenuSelect>>事件.

这篇关于Python/Tkinter:绑定到与当前所选菜单项相关的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆