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?


In reply to Tk, perl 5.6, and scrolled by mullr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.