in reply to Re: Problem with duplicate Entry in One frame
in thread Problem with duplicate Entry in One frame

Hi I follow your code
but perhpas I am doing something wrong, can you tell me what is wrong?
this is the code :
sub update_bank_status { my ($upframe, $bank, $status) = @_; my $entry = $entry_widget{$bank}; unless ($entry) { $entry_widget{$bank} = $upframe -> Label ( -textvariable => \$bank )-> pack ( -side => 'left', -expand => 1 ); $upframe -> Entry ( - width => 20 )-> pack (-side => 'left', -expand => 1); } $entry -> configure (-text => $status); $entry -> configure (-foreground => $status eq "ACTIVO" ? "blue" : + "red" ); } sub update_statuses { open(FILE, "santa1.txt") || die("Could not open file!"); my @stat1=<FILE>; #close(FILE); while (<FILE>) { my ($bank, $status) = split(/\|/,@stat1); print $bank; print $status; update_bank_status ($upframe, $bank, $status); } close (FILE); }
inside the mainloop I put this :
$mw->repeat(5000, \&update_statuses);
Thank you!!! I really apreciate the effort