xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:
But it doesn't work well. Every 3 sec, text widget showed a page, not a line, furthermore, the slider doesn't jump to the end of the text, so you have to drag it to see new added contents.use strict; use warnings; use Tk; my $mw = MainWindow->new(); my $st = $mw->Scrolled("Text",-scrollbars => "eo")->pack(); $st->repeat(3000,\&list); MainLoop; sub list { my $fh; open ($fh, "<D:\\perl_script\\sqlnet.log") or die "error!!$!\n"; while (<$fh>) { $st->insert("end", $_); } close ($fh); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: insert in Text widget
by shmem (Chancellor) on May 25, 2007 at 08:10 UTC | |
by xiaoyafeng (Deacon) on May 25, 2007 at 08:22 UTC | |
|
Re: insert in Text widget
by Khen1950fx (Canon) on May 25, 2007 at 21:53 UTC | |
by xiaoyafeng (Deacon) on May 28, 2007 at 01:26 UTC |