Re: GtkAlignment makes things smaller, but surrouning don't get bigger



On Mon, 2005-03-07 at 13:30 -0800, Ben Johnson wrote:
> On Mon, Mar 07, 2005 at 08:19:17AM -0500, Owen Taylor wrote:
> ...
> > 
> > GtkAlignment is all about the amount of space that a widget takes up
> > *within the space that it was allocated*.
> > 
> > To determine to which child of a container excess space gets allocated,
> > look at the 'expand' parameter of gtk_box_pack_start() or the GTK_EXPAND
> > flag used with GtkTable.
> 
> Thanks Owen.  I'm using Glade to do most of the widget layout.  I do set
> the expand property on everything it allows me to.  When I look in the
> generated source files I see the GTK_EXPAND flag.  Maybe glade is
> missing some expandable elements though?  I'll take a closer look.
> 
> more info...  I use glade to make a dialog.  I partition the main area
> in the dialog in two using a GtkVBox.  In the lower partition I make a
> HBox and fill each area with buttons and set the expand property on each
> button.  In the upper partition I create a "Custom" widget in which I
> insert a simple calculator widget which is comprised of a table buttons,
> each with the expand property set. 

Setting the expand property on the buttons will have no affect on
how the GtkVBox allocates space. You'd have to set the property on
the immediate child of the GtkVBox.

(Note that 'expand' is actually a "child property". The set of 
"child properties" on a widget depends on what container it is packed
into, not what the type of the widget is.)

Regards,
						Owen





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