[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Mouse wheel on gtk2



mquezada@nlxcorp.com wrote:

>I'm using segments of code I wrote in gtk-1.2 that use the mousewheel on a
>drawing area to zoom in and out. I can get all three (L M R) button events
>to respond properly but I can't get an event for the wheel up or down. I
>should mention that the wheel does work with other apps so I know the mouse
>driver is configured properly. It even works on the tool built with gtk-1.2
>that I mentioned.
>
>Currently this are the events I have tied to my drawing area:
>
>ntri_view_drawingarea = gtk_drawing_area_new ();
>gtk_widget_set_events (ntri_view_drawingarea, GDK_EXPOSURE_MASK |
>                                                GDK_POINTER_MOTION_MASK |
>                                                GDK_BUTTON1_MOTION_MASK |
>                                                GDK_BUTTON2_MOTION_MASK |
>                                                GDK_BUTTON3_MOTION_MASK |
>                                                GDK_BUTTON_PRESS_MASK |
>                                                GDK_BUTTON_RELEASE_MASK |
>                                                GDK_KEY_PRESS_MASK);
>
>Any help will be greatly appreciated.
>
>Thanks.
>

Try adding:
    GDK_SCROLL_MASK

And attatching to "scroll-event".


Cheers,
                        -Tristan





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]