On Wed, Mar 05, 2003 at 11:57:24PM +0100, Martin Preishuber wrote:
> > > 2.) I create some windows with glade (pygtk2 1.99.15), to use it I do
> > > something like:
> > > 
> > >   xml = gtk.glade.XML(gladefile)
> > > 
> > > this works fine, but it immidiately shows the window ... is there any
> > > way to load it invisible and set it to visible manually later ? I need
> > > to fill some parts of the window before it is visible.
> > 
> > Go into glade, mark the window, go the Common tab, uncheck Visible.
> 
> thanks again ... how comes, that I feel somehow stupid now ? :|

You shouldn't. This is a very common problem when using liglade to build
a complex application -- the parse of the file has the side-effect of
rendering the window when it's marked as visible.

I've discussed this before, and I'm not sure there is a good solution to
the problem. On one hand, you could ignore the visible attribute for
top-level windows, but that would be violating the 1-1 correspondence
between gladefile and libglade tree which is expected. On the other
hand, you could have Glade make GtkWindows not visible my default; but
then you have a consistency issue between windows and other widgets.

I don't see solutions (beyond stuff like 

    GladeXML("foo.glade", invisible_windows=1)

which I don't like very much). But maybe somebody else does.

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