You might be better off going to a Canvas widget for a smooth indefinite scroll, like for a teleprompter.
#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = MainWindow->new(); $mw->geometry($mw->screenwidth . 'x' . $mw->screenheight ); $mw->title("Scrolling text ----- Click to exit"); my $canvas = $mw->Canvas( -height => $mw->screenheight, -width => $mw->screenwidth, -background => 'black', -relief => 'raised' )->pack(); $mw->fontCreate( "fonta", -family => 'arial', -size => -30, -weight => 'bold' ); my $adjust; while (<DATA>){ chomp; $adjust += 50; $canvas->createText(50,$mw->screenheight + $adjust, -text => $_, -fill =>'hotpink', -anchor => 'nw', -font => 'fonta', -tags => ['mover'], ); } $mw->bind( '<ButtonPress-1>', sub { exit; } ); my $id = $mw->repeat(20, sub{ $canvas->move('mover', 0, -1);} ); MainLoop; __DATA__ Attack of the Microsith Not so long ago, in a computer not so far away, the evil lord of the Microsith, Darth Bill, was conspiring with the enemies of Open Source Federation to take complete control over all motherboards in the known universe. It was during this monstrous conspiracy, that Prince Linus had the revelations from the Force, to create a new electron-manipulation-engine that would be so clean and powerful, that it would thwart Darth Bill's evil plans. In a fortunate turn of fate, a young Jedi named Larry, came upon a powerful technique of controlling electron-flow which would free everyone from the dependency on Darth Bill's polluting technology forever. Darth Bill became aware of a planned meeting between Prince Linus and the young Jedi Larry, and assembled his forces led by the dark lord Daryl, to mount a campaign of harrasment against the Federation. Our story begins.............

I'm not really a human, but I play one on earth. Cogito ergo sum a bum

In reply to Re: How can I get indefinite scroll to work in a TK text widget by zentara
in thread How can I get indefinite scroll to work in a TK text widget by padawan_linuxero

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.