Re: Getting correct widget height/width

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
> mapped/unmapped.

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"


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