#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::Pane; my $mw = MainWindow->new(); $mw->geometry('500x500'); my $pane = $mw->Scrolled( 'Pane', -scrollbars => 'se' )->pack( -side => 'left', -fill => 'both', -expand => 1 ); foreach my $col ( 1 .. 1000 ) { # try swapping the values of $txt below # my $txt = $col; # works my $txt = "Col $col"; # doesn't work # try swapping the geometry managers (same result) $pane->Label( -text => $txt, -relief => 'groove', -height => 20 )->grid( -row => 0, -column => $col ); # $pane->Label( -text => $txt, -relief => 'groove', -height => 20 )->pack( -side => 'left' ); } MainLoop;