This chapter explores the
pack geometry manager that positions widgets on the screen.
Geometry managers arrange widgets on the screen. This chapter describes the
pack geometry manager, which is a constraint-based system. The next two chapters describe the
place geometry managers. The
grid geometry managers are quite general, while
place is used for special-purpose applications. This book uses
pack a lot because it was the original geometry manager for Tk. The
grid geometry manager was added in Tk 4.1.
A geometry manager uses one widget as a parent, and it arranges multiple children (also called slaves) inside the parent. The parent is almost always a frame, but this is not strictly necessary. ...