my $img = $mw->Photo( -file => 'image.png'); my $button = $frame->Button(-image => $img, -command => \&open, -background=> 'white', -borderwidth => '0', )->pack(-side => "right", -anchor => "e", -padx => 3);