=head1 NAME

TickerTape - Display long message in Tk


TickerTape Message


For everyone with a case of Browser envy after using Microsoft's Internet
Explorer, here's a perl/tk script only slightly more useful than a script
to do <BLINK>. Don't know why I wrote it. Don't know why you'd run it.
Maybe if you were writing a ticker tape application. Or had a weird thing
for Times Square. Anyway....

Terry Greenlaw (on-site @ Lockheed Martin)               Encompass Technologies
z50816@mip.lasc.lockheed.com                             terry@encompass.is.net


use Tk;

$top = MainWindow->new;

$message= (@ARGV) ? join(' ',@ARGV) : "THIS IS A VERY LONG SCROLLING MESSAGE...      ";
$l1 = $top->Label(-fg=>'White',-text=>'This is the top of the screen');
$l1->pack( -fill => 'both', -expand => 1 );
$m1 = $top->Label(-fg=>'Red', -bg=>'black',
                 -textvariable => \$message, -width => 15 );
$m2 = $top->Label(-wrap=>1, -fg=>'Green', -bg=>'black',
                 -textvariable => \$message2, -width=>1, -height=>8 );
$l2 = $top->Label(-fg=>'White',-text=>'This is the bottom of the screen');
$l2->pack( -fill => 'both', -expand => 1 );
after(100, \&scroll_it);

sub scroll_it {
$message =~ /(.)(.*)/;
($message2 = $message) =~ s/ /  /g;
$top->after(200, \&scroll_it);