#!/usr/bin/perl use warnings; use strict; use Tk; require Tk::Pane; my $mw = MainWindow->new; my $text = $mw->Scrolled("Text", -relief => 'sunken', -borderwidth => 2, -setgrid => 1, -height => 10, -width => 20, -scrollbars => 'oe')->pack(); $mw->Label(-text=>'Select from choices below')->pack(); my $pane = $mw->Scrolled('Pane', -height => 45, -bg => 'lightgreen', -scrollbars=>'osoe', )->pack(-fill => 'x',-expand=>'yes'); for my $choice(1..30){ my $b1 = $pane->Checkbutton( -text => $choice, -relief => 'flat', -command=> sub{ $text->insert('end',"$choice\n"); }, )->pack(-side => 'top', -pady => 1 ,-anchor => 'w'); } $pane->focus; MainLoop;