Re: How to get the label's height?



Hi Damian,

First, you typically don't call 'realize' directly, and doing so is
completely unnecessary
in your particular case.  The library will do it for you when appropriate.
The simplest
scenario for adding widgets is: you first add them to the window and then
call
gtk_widget_show_all on that particular window.  Calling **show_all is
equivalent to saying
"I am done adding widgets".

The code you currently have has the exact same problem I initially guessed:
it asks for
the size of an unrealized widget.  So, do make sure the GUI loop is run
before you
ask for a widget's size.  You may also find the following useful:
http://www.gtk.org/tutorial/c1761.html#SEC-TIMEOUTS


Regards,

Nickolai



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