[pygtk] confused about the expand and fill in table layout.

krishnakant Mane krmane at gmail.com
Wed Feb 20 05:03:26 WST 2008


hello all,
can some one please help me understand the use of fill and expand in
table layout?
my understanding about table layout is that the attach_left specifies
which column to be used (0 being first column), attach_right specifies
till which column the widget should go (actual position starting from
1) and same with top and bottom in context of row.
which means the top will specify which row starting from 0 should be
the position and the bottom states which actual row should the widget
occupy.
if this understanding is right then what is the utility of expand?
my problem is how can I make a table with lables and text entries
paired with two pares in a row meaning 4 colums.
the issue is that they should be neetly aligned (justified ) and it
should not appear as one widget taking all the space.
I would prefer that the table shrink to fit the widgets but that
should not cramp the widgets at all and if the user resizes (maximise
) the window, the widgets must also adjust accordingly.
and I will be using a VBox where 60% of the top is taken by the table
layout and then there has to be some empty rows to creat a gap and at
the bottom of the screen I would put a button box to put all the
buttons.
so the table with all the widgets followed by some blank space in the
VBOX and then the button box.
I can put the buttonbox at by using pack_end so that it comes at the
bottom of the VBox but I want that nither the table nore the button
box swel up to occupy that blank space.
I am confused if the expand and fill methods can or cannot be put to use here?
regards.
Krishnakant.


More information about the pygtk mailing list