触发pygtk中按钮的悬停事件的功能(triggering a function on hover event for button in pygtk)
python
我想在鼠标悬停在按钮上时更改按钮的文字,
喜欢这个http://www.youtube.com/watch?v=l7vCf_lvUsY
如何在鼠标悬停在pygtk中的按钮上时添加事件
我在文档中找到了这个
I want to change the text of the button when mouse hovers on it,
Like this one http://www.youtube.com/watch?v=l7vCf_lvUsY
How to add an event when mouse hovers on a button in pygtk
I cudnt find this in the documentation
最满意答案
您将要连接到按钮的enter-notify-event和leave-notify-event信号。 不要忘记在事件掩码中启用它们。 我认为你不需要EventBox 。
You'll want to connect to the enter-notify-event and leave-notify-event signals of the button. Don't forget to enable them in the event mask. I don't think you need an EventBox.
更多推荐
发布评论