On Tue, Dec 30, 2008 at 12:49 PM, Yang Zhang <[email protected]> wrote:

Hi Yang,

> Hi, I have a signal handler connected to an Entry's 'changed' signal,

use the "insert-text" instead:

import gtk

def on_change(widget, new_text, new_text_length, position):
    print 'inserted text = ', new_text
    print 'inserted text len = ', new_text_length
    print 'cursor position = ', widget.get_position()

w = gtk.Window()
w.connect("destroy", gtk.main_quit)

b = gtk.Entry()

b.connect("insert-text", on_change)

w.add(b)
w.show_all()

gtk.main()

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
[email protected]
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to