Re: Is it possible to set the size properties of button widgets?

From: Date: Fri, 28 Oct 2005 06:35:04 +0000
Subject: Re: Is it possible to set the size properties of button widgets?
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6310@lists.php.net to get a copy of this message
Chris, > Is it possible for me to set the height and width of a button? Normally not - widgets in Gtk take as much space as they need, or, if told, fill all the space they get. > the problem i've got is that when i create a window (100pixels x 100pixels), > and add a button to the window, the button will be as large as the window. > Can i manually specify the buttons dimensions? If you don't set the window dimensions, the window will be as large as the button needs to be ideally. However, you could add a GtkVBox to the window and pack_start the button in it. Just make sure that the "expand" parameter is set to false. Another, but bad solution would be to use a GtkFixed instead of the vbox, on which you can exactly lay out the button. But be careful with fixed layouts; they don't scale and if the user has a larger font size, he will get problems because there won't be enough space for the button text. -- Regards/MfG, Christian Weiske

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.gtk.general (#6310) next »