in reply to How to avoid the duplicate selection in perl tk
To flesh out AnonyMonk's reply, maintain a hash of items inserted and add a little logic to your double-click call-back.
... my %inserted = map { $_ => 0 } @list; ... $txt_scroll->insert( 'end', "SELECTED IP : $current_ip\n" ) unless $inserted{ $current_ip } ++; ...
I hope this is helpful.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to avoid the duplicate selection in perl tk
by Anonymous Monk on Jan 20, 2011 at 10:45 UTC |