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 ...
Get Tcl and the Tk Toolkit, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.