如何在 GtkOptionMenu/GtkComboBox 中禁用鼠标滚轮滚动
有谁知道如何在 GtkOptionMenu 或 GtkComboBox 中禁用鼠标滚动?当您滚动窗口并且指针经过这样一个抓住焦点并更改值的小部件时,这很烦人!
我看到违规代码已添加回来了,但似乎没有任何机制来禁用此功能。
我正在使用 C 语言工作,但如果能提供任何语言的帮助,我们将不胜感激。
PS 我也许应该提到我正在使用 GTK 2.10,但需要与 GTK 2.4 兼容。
Does anyone know how to disable mouse scrolling in a GtkOptionMenu or GtkComboBox? It is annoying when you are scrolling through a window and the pointer passed over such a widget which grabs the focus and changes value!
I see that the offending code was added a while back, but there doesn't seem to be any mechanism in place to disable this functionality.
I am working in C, but help in any language would be much appreciated.
P.S. I should maybe mention that I'm using GTK 2.10, but need compatibility with GTK 2.4.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这有效 - 我希望可以帮助其他想做同样事情的人:
This works - I hope might help someone else that wants to do the same thing:
您可以尝试禁用小部件上的滚动事件:
You could try disabling scroll events on the widget: