Dear Monks
I'm trying to understand if the folowing is a general issue with the TK Menu, or just a problem I am experiencing. I have a menu with icons: when opening a menu by clicking upon its name, the menu opens fast, but if I move from an opend menu to the next one, just moving the mouse from the first to the second menu, the second menu is displayed quite slowing, building an impage after the other (from the top to the bottom). Here is the script (images must be of course saved locally)
#!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();
Any idea?