Re: padding in Gtk2

From: Date: Wed, 23 Nov 2005 13:42:16 +0000
Subject: Re: padding in Gtk2
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6355@lists.php.net to get a copy of this message
Hi André, André Jansen wrote:
I am noticing that padding in Gtk2 widgets tends to be on the generous side. I'd like to shave off a few pixels, especially to make lists look more compact...
The padding around a child is normally controlled by the container the child is packed into. To change the padding you need to look at either the properties of the container or how the child was added. For example the padding of a child in a box (GtkVBox or GtkHBox) is set in the pack_start or pack_end method. If you want to control the padding for cells in a list take a look the properties for the container the item is in. Items in a list are packed into a GtkCellRenderer. To adjust the padding try fiddling with the xpad and ypad properties of the cell renderer for each column. Ex: $cellRenderer = new GtkCellRendererText(); $cellRenderer->set_property('xpad', 1); -- Scott Mattocks scott@crisscott.com http://www.crisscott.com http://pear.php.net/user/scottmattocks

« previous php.gtk.general (#6355) next »