The final geometry manager we
want to cover is
form. Recently added into the
form is a very different
geometry manager than those we’ve seen so far. To try and
compare it with what we already know, it behaves like a combination
form, it is legal to overlap widgets (as you would
place), but you can also display the widgets
relative to each other and stretch them out to fill the entire
available area and resize with the window (as you would with
pack). The combination of all these abilities
results in a powerful geometry manager.
edge of a widget can be attached to something: the container’s
grid, another widget, or nothing at all. You can also use springs to
push your widgets around in the window based on the strength (or
weight) of the spring. As with the other geometry managers, you can
add padding to your widget.
Let’s look at the options briefly, then go into more detail on how to use them.
are all the legal options for
form. The following
sections show you how to use these options to the best effect.
Uses the given attachment on the bottom side of the widget.
Uses the given weight for a spring on the bottom side of the widget.
-fill => 'x' | 'y' | 'both' | 'none'
Specifies the direction in which to fill when springs are used. There is no default value.
-in => $master
$master as the container ...