Tk::Scrolled - Create a widget with attached scrollbar(s)
$whatever = $parent->Scrolled('Whatever', -scrollbars = 'nw', ... widget options of Whatever here... );
To stop a flood of ScrlWhatever Perl/Tk introcuded the special constructor Scrolled. Scrolled creates a widget of the given Class 'Whatever' with attached scrollbar(s).
Expects as argument the position where the scrollbars should be created. 'w', 'e' or 'n', 's' or a combination of them. If the one or both positions are prefixed with 'o' the scrollbar will only show up if there is a 'real' need to scroll.
'w'
'e'
'n'
's'
'o'
All options beside -scrollbars are passed to the 'Whatever' widget constructor.
If a widget does not support -{x,y}scrollcommand options, Scrolled does not complain if the specified widget class does not support them. E.g.,
$parent->Scrolled('Button', ...)
One does not get an error message or warning when one tries to configure scrollbars after the widget construction:
$ascrolled->configure(-scrollbars => 'e');
Tk::Scrollbar Tk::Widget/Scrollbars Tk::Frame/AddScrollbars
head1 KEYWORDS
scrolled, scrollbar
1 POD Error
The following errors were encountered while parsing the POD:
alternative text 'Tk::Widget/Scrollbars' contains non-escaped | or /
alternative text 'Tk::Frame/AddScrollbars' contains non-escaped | or /
To install Tk, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tk
CPAN shell
perl -MCPAN -e shell install Tk
For more information on module installation, please visit the detailed CPAN module installation guide.