pack() and the division of vertical space

Eric Brunel see.signature at no.spam
Fri Jun 1 09:13:58 CEST 2007

On Thu, 31 May 2007 19:45:04 +0200, christopherlmarshall at  
<christopherlmarshall at> wrote:

> I am trying to figure out how to stack two widgets in a frame
> vertically so that they both expand horizontally and during vertical
> expansion, the top one sticks to the top of the frame and the bottom
> one consumes the remaining vertical space.  I thought this would do it
> but it doesn't.  What am I missing?
[snip code]

For this kind of stuff, don't use pack; use grid. It will be far easier to  
get it working, to read afterwards and to maintain, even if it's slightly  
more verbose. IMHO, pack should only be used to create rows or columns of  
widgets, without any resizing policy, or to put an entire widget into a  
container. If you do anything more complicated than that, you'll find grid  
much easier to handle.

python -c "print ''.join([chr(154 - ord(c)) for c in  

More information about the Python-list mailing list