Frame doesn't like scrolling which is why Tk::Pane was invented. With it you can use Pane inside of a Scrolled method like so:
Hope this helps,#!/usr/bin/perl -w use Tk; use Tk::Pane; $top = MainWindow->new(); $top->maxsize(600,300); $NUMCOLS = 10; # Number of columns to display # Create a frame into which all the text boxes will go $frm = $top->Scrolled( 'Pane', -height => 299, -width => 599, -sticky => 'we', -scrollbars => 'soe' )->pack(-fill => 'both', -expand => 1); # Set up textboxes for ($i = 0; $i < $NUMCOLS; $i++) { $block[$i] = $frm->Text( -width => 20, -height => 30, -background => 'white' ); for ($j = 0; $j < 100; $j++) { $block[$i]->insert('end',"$j\n"); } } ## Pack the textboxes foreach $box (@block) { $box->pack(-side => 'left'); } MainLoop();
In reply to Re: Help scrolling a series of textboxes with Tk
by {NULE}
in thread Help scrolling a series of textboxes with Tk
by jeanine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |