| Geometry Management |
|
|
Online chapter from Tcl/Tk for Programmers (with exercises and solutions). Geometry management is defined above in The Tk Way of Thinking. Review the concepts of "master," "parent," "slave," and "child" there if necessary. Tk has three geometry managers: pack, grid, and place. Of these, place is the easiest to understand and the hardest to use. It is for those of you who want to do all your own geometry management work. If this is your desire, read about place in the on-line manual. The other two are covered here. Any widget whose geometry is managed by Tk (rather than by the window manager) is a slave there is some other window or widget of which it is a part. As far as the examples in this book show, that widget is both its master and its parent. A widget can be both a master and a slave. It can even be a master with respect to one geometry manager and a slave with respect to another. It cannot be a slave to two masters. Also, do not try to make a widget a master with respect to two different geometry managers.
|
Author's Home Page |
|
Order from Amazon. |