use warnings; use strict; use Tk; my $mw = MainWindow->new; my $e = $mw->Entry ->pack; my $c = $mw->Scrolled( qw/Canvas -width 400 -height 400 -relief sunken -bg white -borderwidth 1 -scrollbars se -scrollregion/ => [qw/0 0 1000 1000/])->pack; my $ic = $c->Subwidget('scrolled'); $mw->MouseWheelBind($ic); $ic->Tk::bind('<1>',[$ic,'Tk::focus']); MainLoop;