|
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) RoSoft2001
- (no subject) �yvind Berle
- (no subject) Roboz Béla
- RE: (no subject) Dean Theophilou
- (no subject) Sibi John
- (no subject) Berbiche, Mohcine
- (no subject) xiaomei pan
- (no subject) Sibi John
- (no subject) Sibi John
- (no subject) jason . griffin
- (no subject) roboz
- (no subject) sridhar swargam
- (no subject) DANIEL SKILES
- Re: (no subject) Edward G. Orton
- (no subject) DANIEL SKILES
- Re: (no subject) Edward G. Orton
- (no subject) DANIEL SKILES
- (no subject) DANIEL SKILES
- RE: (no subject) Louie Iturzaeta
- (no subject) jack martin
- Re: (no subject) Trevor Joerges
