use strict; use warnings; use Tcl::pTk; my $mw = MainWindow->new(); foreach (1..10){ my $btn = $mw->Button( -text => "My command", -compound => 'top', -image => $mw->Photo(-file => 'start.png'), ); $btn->pack(-padx => 10, -pady => 10,); } MainLoop; exit(0);