| 13.7 Placing Widgets more Carefully |
|
|
For those cases in which a widget does not fill its associated slice, the pack geometry manager has a way of positioning widgets within slices. Similarly, the grid geometry manager has a way of positioning widgets within cells. Most of the time, the default positioning is just what you want. With this positioning the widget is placed in the center of the slice or cell. When the default absolutely will not do, you use a technique that
depends on the geometry manager you are using.
The -fill option actually has four possible values: "none" (the default), "both," "x," and "y." The first two are discussed above in Slicing for Size Changes. The -fill x option causes the widget to fill its slice in the horizontal directions but not in the vertical. The -fill y option causes the widget to fill its slice in the vertical directions but not in the horizontal. The pack command also accepts an
Positioning Widgets within Cells Instead of the -fill and -anchor options, the grid geometry
manager has
|
Author's Home Page |
|
Order from Amazon. |