Howdy!
Whenever you ->pack a widget (and frames are just another
widget that you happen to be able to put things into),
the space gets divided into two pieces. One gets the
widget and the other remains available for the next
pack operation.
If you pack(-side => 'top') or pack(-side => 'bottom'),
the container is split by a horizontal line and you take
whichever part you claim. 'left' and 'right' split with
a vertical line.
ASCII illustration follows:
+----------------------+ +-----------+----------+
| pack(-side => 'top') | | | |
| | | left | right |
+----------------------+ | | |
| | | | |
| bottom | | | |
+----------------------+ +-----------+----------+
Note that each pack further splits the space in two.
You can not use pack to do:
+----+---------+
| | |
| +----+----+
| | | |
+----+----+ |
| | |
+---------+----+
If you need to do something like that, you have to
use a different mechanism, and I don't know that well
enough to speak off the top of my head.
Another way to look at it is:
You start with a rectangular space. You use pack to
grab a rectangular chunk that touches three sides but
not the fourth, into which you pack your widget. The
remaining rectangular space is where the next pack goes.
If the widget you pack is a container like a Frame, you
have a new space to start with.
"It's rectangles all the way down..."
yours,
Michael |