Hi,

Am Sonntag, den 21.08.2005, 01:47 -0400 schrieb Mystilleef:
> Hello,
> 
> I was trying to capture a signal when text is entered into
> gtk.Entry(). But the signals don't seem to be emitted. Have
> I uncovered a bug? I attached an example file to demonstrate
> the problem.
> 
> The workaround seems to be to use the "insert-text" and 
> "delete-text" signals instead of the gtk.Entry() ones.

that is clipboard stuff.

You want to connect to the "changed" signal (implemented for the
GtkEditable interface, but from a widget user's point of view, thats not
important).



> 
> ============================================================
> 
> #! /usr/bin/env python
> # -*- coding: utf-8 -*-
> 
> import gtk
> 
> class Window(object):
> 
>       def __init__(self):
>               
>               window = gtk.Window(gtk.WINDOW_TOPLEVEL)
>               window.connect("delete_event", self.close_window_cb)
>               window.set_position(gtk.WIN_POS_CENTER)
>               window.set_border_width(1)
>               window.set_size_request(200, 50)
> 
>               entry = gtk.Entry()
>               self.entry = entry
>               entry.connect("insert-at-cursor", self.insert_text_cb)
>               entry.connect("delete-from-cursor", self.delete_text_cb)

entry.connect("changed", self.changed_cb)

[...]


cheers,
   Danny

-- 
www.keyserver.net key id A334AEA6

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
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