Re: allocation returns -1, -1, 1, 1
- From: John Cupitt ng-london org uk
- To: jason shakabuku org
- Cc: jylefort brutele be, gtk-list gnome org
- Subject: Re: allocation returns -1, -1, 1, 1
- Date: Fri, 7 Jun 2002 11:10:04 +0100
Jason Bodnar wrote:
>>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,
Gtk needs to go through the idle loop as well before all the resizing
happens. If you connect to configure you'll see the widget receiving
it's true size (eventually).
John
==========================================================
Coming soon:
Fabric of Vision
Dress and Drapery in Painting
19 June - 8 September 2002
For information and tickets:
http://www.nationalgallery.org.uk/exhibitions/fabric/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]