Re: [gtk-list] Re: getting the widget size



In a previous message, Tim Janik says:
> 
> On Wed, 3 Jun 1998, Kevin Pearson wrote:
> 
> > Hello,
> > 
> > Is there a function or way to get the widget size?
> > 
> > opposite of gtk_widget_set_usize()?
> 
> printf ("widget <%s> size: width=%d, height=%d\n",
>         gtk_type_name (GTK_OBJECT_TYPE (widget)),
>         widget->allocation.width,
>         widget->allocation.height);

What the difference between this and 

     GtkRequisition attributes;
     gtk_widget_size_request(w, &attributes);
     width = attributes.width;
     height = attributes.height;

I've been using the latter instead of the allocation.width/height settings.
It seems to work ok, but maybe its not what I really want.
-- 
Michael J. Hammel           |Webster's definition of Win95: 32bit extensions and
The Graphics Muse           |graphical shell for a 16bit patch to an 8bit OS 
mjhammel@graphics-muse.org  |originally coded for a 4bit cpu, written by a 2 bit
http://www.graphics-muse.org  company, that can't stand 1 bit of competition.



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