Mouse wheel on gtk2

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 |

Any help will be greatly appreciated.


Marco Quezada
Aerospaceo Engineero
NLX Corporation
22626 Sally Ride Dr.
Sterling, VA, 20164
703-234-2100  ext. 1028

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