|
Hi All,
Please help me!
Why doesn't the counter label count in real time in my Tcl/tk Perl
script, though I configure the '$counter' label at all changes
of the "$i" variable.
Thanks: R.
Beci
#!/usr/bin/perl -w
use strict;
use Tk; $|=1; # Create main window
my $main = MainWindow->new; # Add a Label and a Button to main
window
$main->Button( -text => 'Start', -command => sub {progress()} )->pack; my
$counter=$main->Label(
-text=>"0" )->pack(); # Spin the message loop
MainLoop; sub progress {
for my $i (0..15) { sleep(1); $counter->configure(-text=>$i); } } |
- (no subject) YauYuk
- RE: (no subject) Barta, Hank
- (no subject) Venkatesh Subramanian
- RE: (no subject) Edwards, Mark (CXO)
- RE: (no subject) Lee Goddard
- (no subject) miri kim
- (no subject) Brijendra Shekhar Shukla
- (no subject) Brijendra Shekhar Shukla
- RE: (no subject) Bharat Bikram Thapa
- RE: (no subject) Bharat Bikram Thapa
- RE: (no subject) roboz
- RE: (no subject) Lichty, Darren
- (no subject) mehtald
- (no subject) Thomas B�tzler
- (no subject) $B2&(B $B0N(B
- Re: (no subject) Lee Goddard
- admin and I8n ( was RE: (no subject) ) Aaron Trevena
- Re: admin and I8n ( was RE: (no sub... Lee Goddard
- Re: (no subject) $Bill Luebkert
- (no subject) vinod
- Re: (no subject) William H. Du Chene
