Hi All!
In the following snippet:
====
use strict;
use Tk;
require Tk::LabFrame;
my $top = new MainWindow;
my $bar=$top->LabFrame(-label => 'buttons bar');
$bar->pack;
my $exi=$bar->Button(-command=>\&exi,-text=>'exit');
$exi->pack(-side=>'left');
my $prg=$bar->Button(-command=>\&prg,-text=>'prg');
$prg->pack(-side=>'left');
my $fr=$top->LabFrame();
$fr->configure(-height=>'5',-width=>"30");
$fr->pack(-fill=>'none');
my $text0=$fr->Text();
$text0->configure(-height=>'10',-width=>"20");
$text0->pack(-side=>'top',-fill=>'none');
MainLoop;
sub exi{
$top->destroy;
}
sub prg{
for (my $i=0;$i<20;$i++){
$text0->delete('0.0','end');
$text0->insert('end',"$i\n");
sleep 1;
}
}
====
When executing this snippet
I see in text0 only the last $i /in for cycle/
What I must add to prg code
in order to see all cosequtive values of $i ?
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs