Hi jeanine,

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:

#!/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();
Hope this helps,
{NULE}
--
http://www.nule.org

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

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.