Re: getting widget size



When I resize a window, how do I learn what a widget's new size is?
Specifically, I've got a gnome canvas object inside a scrolled window.
How do I know how big the viewport is?

Use this:

GtkWidget widget;

gint width = widget->allocation.width;
gint height = widget->allocation.height;

Carlos




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