#!perl use strict; use warnings; use utf8; use Tk; use Tk::Menu; use Tk::Photo; use Tk::PNG; my $mw = Tk::MainWindow->new(); my $menuitems = [ [Cascade => "~File", -menuitems => [ [Button => "~Neu", -command => \&new, -image => $mw->Photo(-file => '1.png'), -compound => 'left', ], [Separator => ""], [Button => "~Hilfe", -command => \&open, -image => $mw->Photo(-file => '2.png'), -compound => 'left', ], [Button => "~Schließen", -command => sub{ exit(0); }, -image => $mw->Photo(-file => '3.png'), -compound => 'left', ], ], ], [Cascade => "~Options", -menuitems => [ [Button => "~Neu", -command => \&new, -image => $mw->Photo(-file => '1.png'), -compound => 'left', ], [Separator => ""], [Button => "~Hilfe", -command => \&open, -image => $mw->Photo(-file => '2.png'), -compound => 'left', ], [Button => "~Schließen", -command => sub{ exit(0); }, -image => $mw->Photo(-file => '3.png'), -compound => 'left', ], ], ], ]; my $menu = $mw->Menu(-menuitems => $menuitems); $mw->configure(-menu => $menu); $mw->MainLoop();