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.
This code is taken almost verbatim from a writeup by ichimunki, so I trust that it works. But on my system, it doesn't.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;
I tried resizing the scrollbars to something more sensible by adding the following code:
This half solves the problem, but still leaves pretty blatant layout issues.my $xsb = $listbox->Subwidget("xscrollbar"); my $ysb = $listbox->Subwidget("yscrollbar"); $xsb->configure(-width => 10); $ysb->configure(-width => 10);
Any ideas? Has anybody seen this problem?
|
---|
Replies are listed 'Best First'. | |
---|---|
My Solution
by mullr (Sexton) on May 28, 2001 at 22:51 UTC | |
Re: Tk, perl 5.6, and scrolled
by lemming (Priest) on May 28, 2001 at 13:34 UTC | |
by mullr (Sexton) on May 28, 2001 at 21:07 UTC | |
Re: Tk, perl 5.6, and scrolled
by koolade (Pilgrim) on May 28, 2001 at 19:27 UTC |
Back to
Seekers of Perl Wisdom