start page | rating of books | rating of authors | reviews | copyrights
23.9. 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
23.9.1. 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
grid geometry 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. style
is a string that contains zero or more of the characters
n, s, e, or
w. Each letter refers to a side (north, south,
east, or west) to which the slave sticks. If both
n and s (or
e and w) 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.
| | |
23.8. The NoteBook Widget | | 23.10. The ProgressBar Widget |
Copyright © 2002 O'Reilly & Associates. All rights reserved.