use Tk; use Tk::Thumbnail; use strict; my @thumbnails = ("ant_logo_small.gif", "current.gif", "group-logo.gif"); my $mw = MainWindow->new; $mw->geometry("600x400"); my $thumb = $mw->Thumbnail(-images => \@thumbnails, -labels =>0, -width => '50', -height => '50', -command =>\&openwin)->pack; MainLoop; sub openwin { my $tw = MainWindow->new; my $pic = $tw->Photo(-file=>$_[1]); $tw->Label(-image => $pic)->pack; };