Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (12)
As of 2024-05-21 12:59 GMT
Find Nodes?
    Voting Booth?

    No recent polls found