Re: Size of Widgets



On Tue, 9 Nov 2004 17:47:51 +0530, Tapan Satpathy Ansuman-A19108
<ansuman motorola com> wrote:
Hi,

I am trying to get the width and height of the widgets.
For this I am using

widget->allocation.width and
widget->allocation.height.

But both the values are always coming to be 1.

Is there anything else to be done?

    My guess is that you are obtaining these values before the parent
("container") widget has allocated any size for that widget.

You can connect to the "size-allocate" signal to get that value every
time the widget gets resized, as well as when it recieves its initial
allocation.

Cheers,
                                                   -Tristan



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