- or download this
# $main is MainWindow
my $canvas = $main->Scrolled('Canvas',
-scrollbars => 'e',
...
-width => 200,
)->pack;
$canvas->packPropagate(0);
- or download this
-scrollregion => [0,0,200,200],
- or download this
my $frame = $main->Scrolled('Canvas',
-scrollbars => 'e',
...
my $canvas = $frame->Subwidget('canvas');
$canvas->configure(-height => 200, -width => 200);
$canvas->packPropagate(0);
- or download this
foreach (1..20) {
$canvas(or $frame)->Label(-text => 'test')->pack;
}
- or download this
my $canvas = $main->Canvas(-height => 200,
-width => 200,
...
-orient => 'vertical',
-command => ['yview' => $canvas],
)->pack(-fill => 'y', -side => 'right');
- or download this
['yview', $canvas, 'scroll', 1, 'units']