jbuck has asked for the wisdom of the Perl Monks concerning the following question:
As you see, when the width of the columns increases to accommodate the "Col" prefix to the label's text, the overall space occupied by all of the widgets increases and they stop being displayed at some point. When only the column number is displayed in the Label's text, there seems to be enough "room" and everything is rendered correctly. Is there some kind of maximum "scrolled space" beyond which Tk::Pane cannot handle? I am running perl v5.16.3 on RHEL 7.2 (don't ask)#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::Pane; my $mw = MainWindow->new(); $mw->geometry('500x500'); my $pane = $mw->Scrolled( 'Pane', -scrollbars => 'se' )->pack( -side = +> 'left', -fill => 'both', -expand => 1 ); foreach my $col ( 1 .. 1000 ) { # try swapping the values of $txt below # my $txt = $col; # works my $txt = "Col $col"; # doesn't work # try swapping the geometry managers (same result) $pane->Label( -text => $txt, -relief => 'groove', -height => 20 )->g +rid( -row => 0, -column => $col ); # $pane->Label( -text => $txt, -relief => 'groove', -height => 20 )- +>pack( -side => 'left' ); } MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk::Pane widget size limit?
by tybalt89 (Monsignor) on Aug 24, 2021 at 00:32 UTC | |
by jbuck (Novice) on Aug 24, 2021 at 03:34 UTC | |
by tybalt89 (Monsignor) on Aug 24, 2021 at 04:45 UTC | |
by tybalt89 (Monsignor) on Aug 24, 2021 at 12:03 UTC | |
|
Re: Tk::Pane widget size limit?
by choroba (Cardinal) on Aug 23, 2021 at 19:58 UTC | |
by jbuck (Novice) on Aug 23, 2021 at 23:18 UTC | |
|
Re: Tk::Pane widget size limit?
by kcott (Archbishop) on Aug 24, 2021 at 11:08 UTC | |
|
Re: Tk::Pane widget size limit?
by jbuck (Novice) on Aug 23, 2021 at 23:34 UTC | |
by tybalt89 (Monsignor) on Aug 24, 2021 at 13:24 UTC | |
|
Re: Tk::Pane widget size limit?
by Marshall (Canon) on Aug 25, 2021 at 09:28 UTC | |
|
Re: Tk::Pane widget size limit?
by Anonymous Monk on Aug 24, 2021 at 09:09 UTC |