Re: Set position of a Paned widget to 50%



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 9/18/2005 11:15 PM, Nick Johnson wrote:
Hello,

I need to set the initial position of a Paned widget to be 50% of the
size of the widget itself.  However, the Paned widget doesn't have a
get_size() method, and so users must adjust this manually.

Any tips?

After the widget is realized (gtk_widget_show() should do that), check
widget->allocation.width and widget->allocation.height for the size of
the widget.  Divide by two to get the halfway point, and there's your size.

        -brian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)

iD8DBQFDLonq6XyW6VEeAnsRAp3sAJ9V1c97qsyueq/udJyZhw3EFXQ7/QCcDM5N
WdgjdivIPPVeefsuW6ATvNY=
=yl7A
-----END PGP SIGNATURE-----



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