use Tcl::pTk; #use Tk;#using this instead of Tcl::pTk it is 10x/20x quicker #use Tk::PNG; my $mw = MainWindow->new(); my $lab = $mw->Label(-text => "Hello world")->pack; foreach (1..30){ my $PngSettings = $mw->Photo( -file => "settings.png"); $mw->Button(-image => $PngSettings, -command => sub { $lab->configure(-text=>"[". $lab->cget('-text')."]"); }, -borderwidth => '0', )->pack(-side=>'right', -anchor => 'e', -padx=>5, -pady=>5); } MainLoop;