Re: Getting correct widget height/width
- From: Havoc Pennington <hp redhat com>
- To: Ian King <king eiffel com>
- Cc: gtk-list gnome org
- Subject: Re: Getting correct widget height/width
- Date: 22 May 2001 16:33:46 -0400
Ian King <king eiffel com> writes:
> Is there a way of 'always' returning the correct height/width of a
> widget whether or not it has been expanded in its parent or is
What do you mean by "correct"?
The current width/height of a widget is widget->allocation.width,
widget->allocation.height. This should always be true.
Now, whether the current width/height is what you expect at the time
you're checking it is another issue...
You'll need to specify more precisely what you want to do.
Normally the right way to think about this is "how can I track the
size of a widget?" and the answer is "gtk_signal_connect_after() a
handler to size_allocate"
] [Thread Prev