size of individual widgets
- From: Tomas Berndtsson <tomas nocrew org>
- To: gtk-list gnome org
- Subject: size of individual widgets
- Date: 14 Apr 2001 19:03:51 +0200
Hi,
I need to be able to find the size (width/height in pixels) allocated
for a widget, which is not displayed anywhere. I want to create a
widget, for example a button with a given label, find out how many
pixels in width and height it takes, and then destroy the widget
again.
If I do the above, I always get the width and height as 1 (one) pixel
each, no matter what I set the label to. I get the size from
GTK_WIDGET(button)->allocation.width/height.
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?
Tomas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]