http://www.perlmonks.org?node_id=83706

mullr has asked for the wisdom of the Perl Monks concerning the following question:

Here's the scoop:

Upon upgrading my system to Redhat 7.1 (and thus to perl 5.6), my pet program broke. I've isolated the problem, and it lies it the Scrolled function. Here's an example which should, as far as I can tell, work properly.

use strict; use Tk; my $mw = MainWindow->new( -title => 'Test' ); my $listbox = $mw->Scrolled( 'Listbox' ); my @list = ( qw ( foo bar baz batz dingo dongo dango floo blar blaz blatz zingo zongo zango fi ba be bz uno duo trio quitro ) ); for my $item (@list) { $listbox->insert( 'end', $item ); } $listbox->pack( -expand => 1, -fill => 'both' ); MainLoop;
This code is taken almost verbatim from a writeup by ichimunki, so I trust that it works. But on my system, it doesn't.

I tried resizing the scrollbars to something more sensible by adding the following code:

my $xsb = $listbox->Subwidget("xscrollbar"); my $ysb = $listbox->Subwidget("yscrollbar"); $xsb->configure(-width => 10); $ysb->configure(-width => 10);
This half solves the problem, but still leaves pretty blatant layout issues.

Any ideas? Has anybody seen this problem?