in reply to Tk::Thumbnail newbie issues
Make the following modification, and your problem should be resolved. (Solution tested with Perl 5.8.0 on win32)
my $thumb;
sub choosethumbs { @selection = grep(m/.*\/$country\/.*/, @justfiles); if ($thumb) {#added four lines of code to destory the old thumb $thumb->destroy; $thumb = undef; } $thumb = $mainframe->Thumbnail(-images => \@selection, -labels =>0 +, -width => '75', -height => '75', -background => 'black', -command = +>\&openwin)->pack; }
|
|---|