Re: How to get the widget's current width and height?



On Wednesday 19 November 2003 14:41, Tom Liu wrote:

Thanks iain just told me:
      GTK_WIDGET (widget)->allocation.width;
      GTK_WIDGET (widget)->allocation.height;
This code works! And thanks GTK+ use C so that we can access all the
private data they have.

According to gtkwidget.h this is a 'public' member. Not sure why it's not 
documented in the API reference (at least not the online version). If in 
doubt, trust the source code ;-)

Cheers
 -Tim




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