[pygtk-0.6.6, gtk+-1.2.7, python 2.1, i86 linux 2.2.16]

I have some text and entry widgets, and when the user changes the
value in one of them and moves on to another widget in the GUI,
I need to grab the changes and put them in the database. 

I've tried:
    self.comment_text.connect('leave_notify_event', self.leave_event, 
self.comment_text)
    def leave_event(self, a, ev, c):
        for s in dir(ev):
            print s, eval('ev.%s' % s)

but it's not clear how to decode the event object.  
The 'type' field is certainly == gtk.GDK.LEAVE_NOTIFY == 11, 
but I get this event on entering AND twice on leaving the widget!

How can I distinguish these?  Sometimes the 'detail' field varies, but
it doesn't seem reliable.  

Or is there some altogether different approach
to this problem?

Thanks,
   -- George Young

E.g. output:
detail 0
focus 0
mode 0
send_event 0
state 0
subwindow None
time -1065713290
type 11
window <GdkWindow at 83522c8>
x 5.0
x_root 1289.0
y 104.0
y_root 755.0

-- 
 I cannot think why the whole bed of the ocean is
 not one solid mass of oysters, so prolific they seem. Ah,
 I am wandering! Strange how the brain controls the brain!
        -- Sherlock Holmes in "The Dying Detective"
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to