Re: gtk_widget_show() doesn't "show".

On Thu, 30 Nov 2000, Joshua Horvath wrote:

> If you're creating all this stuff in a single function, I believe all the
> "show" events just get queued until you return to the main gtk loop.  So to
> have things appear as you create them I think you'd have to do something like
> [create_notebook_page]
> gtk_widget_show(page);
> while (gtk_events_pending())
> 	gtk_main_iteration();
> and so on...

   Bingo!  That was it.  I had thought something along these lines, and
even inserted a call to gtk_main_iteration(), but only *one* call, which
was obviously not enough.  I put in that loop, and the problem goes away.

   Many thanks!

Jim Wiggs
wiggs wiggs net

> -Josh
> "James K. Wiggs" wrote:
> > 
> >  Folks,
> > 
> >    After I create the top level window and place the notebook in it, I
> > call gtk_widget_show_all( window ), after I create the scrolled window
> > I show it, after I create the canvas I show it, I even deliberately add
> > extra redundant gtk_widget_show() calls for all of the objects before
> > I try to get the adjustment values.  I even added in a call to
> > gtk_main_iteration() before getting the adjustment values.  All to no
> > avail.  It just will not show the items until the very end, and as a
> > consequence, I can't get valid values for the width and height of the
> > viewport.
> > 
> >    Can *anybody* give me any clues as to what's happening, here?
> > 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]