in reply to Problem with duplicate Entry in One frame
Hi thanks, but my problem continues you see this is what is happenning on the screen :What you really need to do then is to update the widgets that you've already created, and in order to do that you'll need to keep track of the which widgets are associated with which banks.STATUS : BANK1 ACTIVE BANK2 ACTIVE BANK3 ACTIVE STATUS : BANK1 ACTIVE. +...
And then you call update_statuses() every 10 seconds.my $upframe = ...; my %entry_widget; # stores the entry widget for a bank sub update_bank_status { my ($upframe, $bank, $status) = @_; my $entry = $entry_widget{$bank}; unless ($entry) { $entry_widget{$bank} = ...create a new label and entry widget... } $entry->configure(-text => $status); $entry->configure(-foreground => $status eq "ACTIVO" ? "blue" : "red"); } sub update_statuses { ...open file... while (<FILE>) { my ($bank, $status) = ...parse info...; update_bank_status($upframe, $bank, $status); } close(FILE); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem with duplicate Entry in One frame
by padawan_linuxero (Scribe) on May 20, 2008 at 20:14 UTC |