[EMAIL PROTECTED] wrote:
>> 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 consequtive values of $i ?


I believe it's becuase you're not getting back to MainLoop to update
the display.  You could put the prg sub on a timer and handle it that
way or force a screen update with '$text0->update;' in the prg loop.
++++++++++++++++++++++++++++++++
 Thanks to all !
 I received even more than I asked for !
 It is a Great List!
 update is the answer.
=======
 I looked for no special effects -
 I only wanted to implement status line in my perl-Tk
 to register starting -stopping of applications ...etc
 
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to