开发者

How do I disable default Tkinter key commands?

开发者 https://www.devze.com 2023-01-10 06:24 出处:网络
I\'d like to implement my own key command. However when I do, it does both what I tell it and the default command. How do I disable the default command, so that my command is the only one that runs?

I'd like to implement my own key command. However when I do, it does both what I tell it and the default command. How do I disable the default command, so that my command is the only one that runs?

开发者_如何学Go

This is on Windows 7, BTW.


Put return 'break' at the end of your event handling function. This tells Tkinter not to propagate the event to default handlers.

0

精彩评论

暂无评论...
验证码 换一张
取 消