Re: allocation returns -1, -1, 1, 1



> On Thu, 6 Jun 2002 20:21:13 -0500
> "Jason Bodnar" <jason shakabuku org> wrote:
> 
> > I'm adding hboxes as needed in a signal handler to hold rows of photo
> > thumbnails. The first hbox which is created before the main loop even
> > starts returns proper numbers from $widget->allocation but hboxes that
> > are added during the signal handler return -1, -1, 1, 1 for x, y,
> > height and width. 
> > 
> > 
> > I'm calling show_all on the hboxes parents to make sure everything
> > gets shown so I guess I need to some how force space to be allocated
> > for the hboxes since that doesn't seem to happen inside the signal
> > handler?
> 
> $widget->realize() might help you.

Unfortunately, that didn't seem to help. If I called realize on the widget
before it was packed I got an error about a NULL window which makes sense. If
I called realize after it's packed I still got -1, -1, 1, 1.

Thanks for your help,

Jason


--
Jason Bodnar
jason shakabuku org
http://www.shakabuku.org




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