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



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.  Without a GtkAlignment the buttons
in the lower partition take up too much space.  So, I add an alignment,
inside the lower partition, outside of the contained HBox.  I set the
vertical scale to something smaller than 1.  I then expect the
calculator widget above to fill in the newly available space, but it
doesn't.

like i said, the calculator widget is basically just a table of buttons,
and all the buttons have the GTK_EXPAND flag set.  what should I look
for?

Thanks,

- Ben




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