21. Geometry Managers
Geometry managers determine the sizes and locations of widgets. Tk is similar to other toolkits in that it does not allow widgets to determine their own geometries. A widget does not even appear on the screen unless it is managed by a geometry manager. This separation of geometry management from internal widget behavior allows multiple geometry managers to exist simultaneously and permits any widget to be used with any geometry manager. If widgets controlled their own geometry, this flexibility would be lost: every existing widget would need to be modified to introduce a new style of layout.
This chapter describes the overall structure of geometry management and then presents the three geometry managers. The gridder, which ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access