Hello monks
this is surely a naive question, but me and Menus in Tk are not really good friends. How do I add an icon to a pop-menu contructed like this?
#use strict;
use warnings;
use Tk;
my $mw = tkinit();
my $CkAutomaticBackUp;
my $b1 = $mw->Button(
-text => "Create pop-up",
);
$b1->grid(-row => 0, -column => 1,);
Popup($mw, $b1);
$mw->MainLoop;
sub Popup{
my ($mw, $obj) = @_;
my $menu = $mw->Menu(-tearoff=>0, -menuitems=>[
[command=>"Something", -command=>[sub {print "Hello"}, $obj,]],
]);
$obj->menu($menu);
$obj->bind('<ButtonPress>', ['PostPopupMenu', Ev('X'), Ev('Y'), ])
+;
return $obj;
}