On Mon, Jan 19, 2004 at 12:48:06PM -0300, Michel Thadeu wrote:
> The problem is that I execute a gtk.main() to put the program in the
> mainloop... I need to populate the liststore, but or I populate before
> showing all the widgets with gtk.main() or I execute next to the
> gtk.main(), in this case the list are populated only when I close the
> app...
> 
> Is there a way to define a callback when the program shows the app?

Yes, and there are a couple of different ways to do it. For instance,
you can:

    a) Connect to the main window's "map" or "realize" signal and
       populate the list there. IIRC that map can be issued multiple
       times, so you'll need to avoid repopulating.

    b) Use an idle handler, which runs a function or method during the
       mainloop (gtk.idle_add(func_ref))

There are other ways (`invente a sua'), each with slightly different
semantics. If you have a specific problem, you can ask and we'll try to
solve it.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
_______________________________________________
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