use strict; use warnings; package ButtonDemo; use base qw(Wx::App); use Wx qw(wxBITMAP_TYPE_GIF ); use Wx::Event qw( EVT_BUTTON ); sub OnInit { $frame = Wx::Frame->new( undef, -1, 'Titel'); $bitmap = WxBitmap->new('verzeichniss/nice.gif', wxBITMAP_TYPE_GIF ); $knopf = Wx::BitmapButton->new($fenster, -1, $bitmap); EVT_BUTTON($knopf, sub{ # was knopf machen soll }); $frame->Show(1); } package main; ButtonDemo->new->MainLoop;