Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Tk, perl 5.6, and scrolled

by mullr (Sexton)
on May 28, 2001 at 11:22 UTC ( #83706=perlquestion: print w/replies, xml ) Need Help??

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?

Replies are listed 'Best First'.
My Solution
by mullr (Sexton) on May 28, 2001 at 22:51 UTC
    After much pain and strife, I solved the problem. As I suspected, it was not the part of any of my code. Rather, it was a configuration issue, my own fault, not the upgrade's.

    First, there were some other symptoms that turned out to be related to the problem.

  • Qt applications would show up incredibly huge. This was not a big problem, nor did I notice it right away because I seldom use those programs.
  • Some Tcl/Tk programs exhibited the same behaviour as the Qt programs. The also showed the scrollbar wierdness that I originally saw.

    After thinking about this for awhile, I realized that I had been mucking with my X configuration a little, but I had dropped it and never finished with it. Since my oft-used applications were not affected, I didn't link it to the problem. But, upon removing  Load  "xtt" from the "Module" section of my XF86Config, all of the problems vanished.

    Ah, lessons learned.

    See you, space cowboy

Re: Tk, perl 5.6, and scrolled
by lemming (Priest) on May 28, 2001 at 13:34 UTC
    I'm not seeing your problem though I'm running 5.6.0 on Suse 7.1. Which version of Tk.pm are you using?
    Suse 7.1. comes with Tk Version 800.014
      I have version 800.022. Note that this was not upgraded when the problem started.... this makes NO sense.

      See you, space cowboy

Re: Tk, perl 5.6, and scrolled
by koolade (Pilgrim) on May 28, 2001 at 19:27 UTC

    I don't see the problem either and I'm running RedHat 7.0, Perl 5.6, Tk 800.023

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://83706]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2022-10-04 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (15 votes). Check out past polls.

    Notices?