Re: pyGTK on Mouse over event ?
I've managed to get it all working ! I've used an Image inside an eventBox and used the motion notify event. The trick was to add the Events in the Common tab of the Glade property editor. Those where the MASK's you where talking about. Anyway, now it works just fine :) Thx for the information and for pushing me into the right direction :) -- http://mail.python.org/mailman/listinfo/python-list
Re: pyGTK on Mouse over event ?
the POINTER MOTION MASK doesn't do the trick either. This is the first time i'm using python and pyGTK and it's really sad to see that a simple mouseover is hard to program. :s -- http://mail.python.org/mailman/listinfo/python-list
Re: pyGTK on Mouse over event ?
[EMAIL PROTECTED] wrote: def __init__(self): xml = gtk.glade.XML("/home/domenique/project1.glade") self.window = xml.get_widget("window1") self.img = xml.get_widget("image1") self.img.set_from_file("./test.svg") self.img.show() self.img.add_events(gtk.gdk.BUTTON_MOTION_MASK) xml.signal_autoconnect({ 'on_window1_delete_event': self.on_window1_delete_event, 'on_window1_destroy_event': self.on_window1_destroy_event, 'on_image1_motion_notify_event': self.on_image1_motion_notify_event, 'on_image1_button_press_event': self.img_key_press, }) This is the code so far. i've added the MOTION MASK to the image widget, is that what u ment ? Actually I read too fast. I meant BUTTON_PRESS_MASK (not motion) for the button_press_event. For motion_notify_event, I guess it would be POINTER_MOTION_MASK (not button). -- http://mail.python.org/mailman/listinfo/python-list
Re: pyGTK on Mouse over event ?
no problem i'll just keep using the eventbox but is there an event wich is triggert when the mouse moves over the eventbox ? -- http://mail.python.org/mailman/listinfo/python-list
Re: pyGTK on Mouse over event ?
[EMAIL PROTECTED] wrote: def __init__(self): xml = gtk.glade.XML("/home/domenique/project1.glade") self.window = xml.get_widget("window1") self.img = xml.get_widget("image1") self.img.set_from_file("./test.svg") self.img.show() self.img.add_events(gtk.gdk.BUTTON_MOTION_MASK) xml.signal_autoconnect({ 'on_window1_delete_event': self.on_window1_delete_event, 'on_window1_destroy_event': self.on_window1_destroy_event, 'on_image1_motion_notify_event': self.on_image1_motion_notify_event, 'on_image1_button_press_event': self.img_key_press, }) This is the code so far. i've added the MOTION MASK to the image widget, is that what u ment ? Yes. But I guess by your question it doesn't work better than before. Sorry I didn't help much. :/ -- http://mail.python.org/mailman/listinfo/python-list
Re: pyGTK on Mouse over event ?
def __init__(self): xml = gtk.glade.XML("/home/domenique/project1.glade") self.window = xml.get_widget("window1") self.img = xml.get_widget("image1") self.img.set_from_file("./test.svg") self.img.show() self.img.add_events(gtk.gdk.BUTTON_MOTION_MASK) xml.signal_autoconnect({ 'on_window1_delete_event': self.on_window1_delete_event, 'on_window1_destroy_event': self.on_window1_destroy_event, 'on_image1_motion_notify_event': self.on_image1_motion_notify_event, 'on_image1_button_press_event': self.img_key_press, }) This is the code so far. i've added the MOTION MASK to the image widget, is that what u ment ? -- http://mail.python.org/mailman/listinfo/python-list
Re: pyGTK on Mouse over event ?
[EMAIL PROTECTED] wrote: if i add a motion_notify or even a butten_press event to an image object it does absolutly nothing :s I have tried coding a simple application in pyGTK and I remember I had trouble getting button_press event in a DrawingArea. I was using glade and despite having declared a handler to this event, I had to manually call add_events(gtk.gdk.BUTTON_PRESS_MASK) (the connect was ok but the event mask was not). Have you checked this? -- http://mail.python.org/mailman/listinfo/python-list
Re: pyGTK on Mouse over event ?
if i add a motion_notify or even a butten_press event to an image object it does absolutly nothing :s -- http://mail.python.org/mailman/listinfo/python-list
Re: pyGTK on Mouse over event ?
[EMAIL PROTECTED] wrote: hello, Is there an event simular to the java event onMouseOver ? I want to get the coordinates of the mouse pointer when it is over an image ( GTKImage widget) I've tried using the EventBox with the motion_notify but that only seems to work when the mouse is pressed ? Why do you use an event box? Image derives from Widget hence can be connected to the motion-notify-event just like EventBox. Did you try directly? -- http://mail.python.org/mailman/listinfo/python-list
pyGTK on Mouse over event ?
hello, Is there an event simular to the java event onMouseOver ? I want to get the coordinates of the mouse pointer when it is over an image ( GTKImage widget) I've tried using the EventBox with the motion_notify but that only seems to work when the mouse is pressed ? -- http://mail.python.org/mailman/listinfo/python-list