Re: size of individual widgets
- From: Tomas Berndtsson <tomas nocrew org>
- To: Havoc Pennington <hp redhat com>
- Cc: gtk-list gnome org
- Subject: Re: size of individual widgets
- Date: 15 Apr 2001 09:33:03 +0200
Havoc Pennington <hp redhat com> writes:
> > I'm using GTK+ 1.2, and I've tried to look for how to do this in the
> > documentation and the FAQ, but couldn't find anything about it. Is it
> > possible to find out the size of individual widgets like this?
> The button won't get a size allocation until it's onscreen.
> You can just call gtk_widget_size_request() to see what size it would
> have requested. (This isn't necessarily the size it will end up with
> in all cases if you put it onscreen, but is the "natural" size of the
Ok. I managed to find another way of doing this. I created a window
which I placed the button in. I then called gtk_widget_realize() on
the window. Then the button had gotten an allocated size. Then I just
destroy the whole window.
] [Thread Prev