in reply to Perl::Tk and cursor in Menubutton

What a coincidence - I was looking at exactly the same thing less than 24 hours ago.

I managed to change the cursor initially with:

my $priority = 40; ... $mw->optionAdd(q{*cursor}, q{left_ptr}, $priority);

However, as soon as I clicked on either the menubar or a menu button, the cursor reverted to what it was prior to using optionAdd.

Just for completeness, I also tried (and got the same result) with the more specific:

$mw->optionAdd(q{*Menu.cursor}, q{left_ptr}, $priority);

Setting $priority as high as 100 had no discernible effect either.

In the source code (for Menu.pm), I found a binding:

$mw->bind($class,'<ButtonPress>','ButtonDown');

I'm fairly sure this is causing the behaviour that we're both seeing.

I suspect overriding this binding will resolve the issue, though I've not had a chance to try this yet.

There may be other related issues in Menubar.pm, Menubutton.pm and Menu/Item.pm.

-- Ken