[Glade-users] pointer_motion, button_press, etc. not working



Hi,

I'm having what I gather is a fairly common Glade newbie problem. I 
want to handle pointer motion and button press signals over a drawing 
area. I'm using Glade 2.0.0, Python 2.2 and PyGTK 2.0

I've created a simple test window in Glade - a drawing area in a vbox 
in a window. I've added signal handlers to the drawing area for 
'button_press_event', 'motion_notify_event', 'configure_event' and 
'expose_event'. As expected configure and expose worked straight away. 
Using Google I found that for the other signals I needed to modify the 
events mask on the command tab of the properties window. I selected 
GDK_EXPOSURE_MASK, GDK_POINTER_MOTION_MASK, 
GDK_POINTER_MOTION_HINT_MASK and GDK_BUTTON_PRESS_MASK.

This didn't work which I thought was a little odd. If, after loading 
the Glade file, I call add_events for the drawing area widget and add 
each of the above events it almost works. The button press events occur 
but the motion events are borken. When I enter the window I see a 
single motion event. When I move the mouse after a button press I see a 
single motion event. I think I should see motion events repeatedly as I 
move the mouse about over the drawing area but it's not happening.

There's a pygtk demo app called Scribble which handles all these 
events. It doesn't use Glade.

Help?





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