perllee has asked for the wisdom of the Perl Monks concerning the following question:
Hello,everyone:
<<How to be in the following code rolling display data (real time)?
use Tk; my $mw = new MainWindow; # Main Window my $frm_name = $mw -> Frame(); my $lab = $frm_name -> Label(-text=>"IP:"); my $ent = $frm_name -> Entry(); my $but = $mw -> Button(-text=>"Push Me", -command =>\&push_button); my $textarea = $mw -> Frame(); #Creating Another Frame my $txt = $textarea -> Text(-width=>40, -height=>10); my $srl_y = $textarea -> Scrollbar(-orient=>'v',-command=>[yview => $t +xt]); my $srl_x = $textarea -> Scrollbar(-orient=>'h',-command=>[xview => $t +xt]); $txt -> configure(-yscrollcommand=>['set', $srl_y], -xscrollcommand=>['set',$srl_x]); $lab -> grid(-row=>1,-column=>1); $ent -> grid(-row=>1,-column=>2); $frm_name -> grid(-row=>1,-column=>1,-columnspan=>2); $but -> grid(-row=>4,-column=>1,-columnspan=>2); $txt -> grid(-row=>1,-column=>1); $srl_y -> grid(-row=>1,-column=>2,-sticky=>"ns"); $srl_x -> grid(-row=>2,-column=>1,-sticky=>"ew"); $textarea -> grid(-row=>5,-column=>1,-columnspan=>2); MainLoop; #This function will be executed when the button is pushed sub push_button { my $ip = $ent -> get(); my $ping = `ping $ip`; $txt -> insert('end', "$ping");#Here is not the results of real-time d +isplay }
Here to run the results without scrolling display, how to modify?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How the Perl/TK scroll box like MSDOS rolling display data?
by zentara (Cardinal) on Nov 28, 2012 at 10:50 UTC | |
|
Re: How the Perl/TK scroll box like MSDOS rolling display data?
by choroba (Cardinal) on Nov 28, 2012 at 09:40 UTC | |
by Anonymous Monk on Nov 28, 2012 at 13:03 UTC | |
by choroba (Cardinal) on Nov 28, 2012 at 14:08 UTC | |
by Anonymous Monk on Nov 28, 2012 at 14:14 UTC | |
|
Re: How the Perl/TK scroll box like MSDOS rolling display data?
by Anonymous Monk on Nov 28, 2012 at 09:41 UTC |