Does something like `acceptsMouseWheel_(false)` exist?

Greetings,

Whenever I mouse scroll (i.e., two finger swipe on my MacBook Pro) while the mouse is over a PopUpMenu the menu changes, which I don’t want it to do. This also happens with EZSliders. A mouse wheel or mouse scroll will change the slider. I don’t want any of my GUIs to respond to this. I want to specify for each of these GUIs something like .acceptsMouseWheel_(false) or something that would cause the equivalent. Any suggestions?

Thanks,

Ted

There isn’t directly this feature. But there is key and mouse event propagation:

So, in theory, myView.mouseWheelAction = { true } should block the wheel from doing anything in the view (including scrolling the parent); setting it to { false } should block the view’s wheel action and pass it up to the parent (where, if the parent is a ScrollView, should keep scrolling). But I haven’t verified that it works as advertised.

FWIW a GUI framework that begins responding to scroll events in one view (e.g. a scrolling container) and then latches onto another view mid-scroll is IMO careless – that is, this may be Qt’s fault. I saw this behavior in other software too and it’s truly awful.

hjh

1 Like