[pygtk] updating with combo-entry

Christian Reis kiko@async.com.br
Wed, 30 Oct 2002 08:57:55 -0300


On Wed, Oct 30, 2002 at 11:11:45AM +0100, mekkaoui omar wrote:
> I would like to update information on a window after 
> selecting an entry in the combo.  But, I don't know which 
> signal I will use to associate it to an "updating function".

Heh. You're starting to discover things that nobody is supposed to know.
There is no direct signal for Combo changed, but you can catch the
Combo's entry's insert_text/delete_text or changed and it will work,
though it will call your callback many times. The Combo is a container,
wrapping a button and an entry, and only the entry actually holds the
state the Combo is in. So:

    combo.entry.connect("changed", my_callback)

And be glad you're not using an OptionMeny, because there *is no such
thing* for gtk1.2's OM.

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL