The Pane Widget
The Pane widget is essentially a Frame widget that may be scrolled. Within the Pane, you can pack whatever widgets however you like:
my $pane = $mw->Scrolled(qw/Pane -scrollbars osw/)->pack; foreach (1 .. 20) {
$pane->Label(-text => "Label $_")->pack;
}
The previous code produced Figure 23-17.
Figure 23-17. A Pane widget with a Scrollbar
Pane Options
The following options are available for Pane:
-gridded => 'x' | 'y' | 'xy'- Specifies if the top and left edges of the pane should snap to a grid column. This option is useful only if the widgets in the pane are managed by the
gridgeometry manager. -sticky=>style- If the Pane is larger than its requested dimensions, this option may be used to position (or stretch) the slave widgets within their cavity.
is a string that contains zero or more of the charactersstylen,s,e, orw. Each letter refers to a side (north, south, east, or west) to which the slave sticks. If bothnands(oreandw) are specified, the slave is stretched to fill the entire height (or width) of its cavity.
There are also various methods to position the Pane's view. See the POD documentation for more information.