#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::Pane; my $mw = MainWindow->new(); $mw->geometry("600x300+100+100"); $mw->Button( -text => "Exit", -command => sub { exit } )->pack( -side => 'bottom', -fill => 'x' ); my $parent = $mw->Scrolled('Pane' ) ->pack( -fill => 'both', -expand => 1 ); my $yscroll = $parent->Subwidget('yscrollbar'); my @listboxes; foreach my $num (1..4) { my $list = $parent->Scrolled('Listbox'); foreach my $num (1..100){ $list->insert( 'end', $num); } $list->pack( -side => 'left', -fill => 'y', -expand => 1 ); push @listboxes, $list; } $yscroll->configure( -background => "lightgreen", -troughcolor => "black", -command => sub { foreach my $list (@listboxes) { $list->yview(@_); # $list->yviewScroll(1,'units'); } }, ); MainLoop;