Re: Set position of a Paned widget to 50%
- From: "Brian J. Tarricone" <bjt23 cornell edu>
- To: gtk-app-devel-list gnome org
- Subject: Re: Set position of a Paned widget to 50%
- Date: Mon, 19 Sep 2005 02:50:34 -0700
-----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]