use strict; use warnings; use Tk; use Tk::ImageButton; my $mw = MainWindow->new; my $someimage = $mw->Photo(-format => 'bmp', -file => 'C:/WINDOWS/Zapotec.bmp'); my $otherimage = $mw->Photo(-format => 'bmp', -file => 'C:/WINDOWS/Greenstone.bmp'); my $ib = $mw->ImageButton( -imagedisplay => $someimage, -imageclick => $otherimage, -command => [ sub { print "It works"; } ], )->pack; MainLoop;