how to make comboboxes not to respond to mouse wheel up and down

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to make comboboxes not to respond to mouse wheel up and down

Gtkmm mailing list
Hello,
I would like to make combobox not to respond to mouse wheel up and down. It should not make a new element active and should not produce any signal_changed.
I succeeded to do so for spinbuttons, but I was not able to do it for comboboxes.

Here is it what I did so far for spinbuttons:
Gdk::EventMask mask = spinbutton->get_events();
mask &= ~Gdk::EventMask::SCROLL_MASK;
spinbutton->set_events(mask);

But removing such event masks for comboboxes does not help.
Do anyone has any clue about this ?

Thanks in advance.

_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|

Re: how to make comboboxes not to respond to mouse wheel up and down

Gtkmm mailing list
Probably you should connect to .signal_scroll_event() before the default handler and return TRUE to stop it from being called.


_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|

Re: how to make comboboxes not to respond to mouse wheel up and down

Gtkmm mailing list
...which is because the events are really received by the Button internal to the ComboBox, which you don't have access to, not the outer ComboBox itself, which is just a passive Bin.

_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list