I intended to make something that concerns the motion of the mouse pointer.
And in the program I worked around with the 'motion_notify_event' thing, but
the program and all my testing scripts for this issue failed to do what I
expected, including the one below

#############################################
# ttt.py

import pygtk
pygtk.require('2.0')
import gtk

class TTT:
   def __init__(self):
       self.mw = gtk.Window(gtk.WINDOW_TOPLEVEL)
       self.mw.connect('delete_event', gtk.main_quit)
       self.mw.connect('motion_notify_event', self.motion_notify_event)
       self.mw.show()

   def motion_notify_event(self, widget, event):
       print event    # This should print something

   def run(self):
       gtk.main()


if __name__ == '__main__':
   tt = TTT()
   tt.run()
################################################

I expected something be printed out when I move the mouse within the main
window, but the result is that no printing ever happened.

Is there anything wrong with my script? Something else I should set up?....
Thanks in advance : )
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to