In many widget present option -cursor.
In Menubutton widget it present too...
When I set
$TOP->optionAdd("*Cursor",'');
then cursors of all widgets must be as system cursor.
But in pulldown menus of Menubutton widget I have 'arrow' styled cursor.
Example:
sub help_menuitems { [['command',$messages[44],-command=>[\&help],-accelerator=>'F1']]; } $help=$menubar->Menubutton(-cursor=>'',-text=>$messages[50],-menuitems + => help_menuitems,-tearoff=>0,-state=>'active'); $help->pack(qw/-side left/);
Whith this code I have system cursor for menubutton only. After entering in pulldown menu cursor change to 'arrow' style.
I saw code of Menubutton.pm and find this(from line 191):
... my $cur = $Tk::postedMb; if (defined $cur) { Tk::Menu->Unpost(undef); # fixme } $Tk::cursor = $w->cget('-cursor'); $Tk::relief = $w->cget('-relief'); $w->configure('-cursor','arrow'); $w->configure('-relief','raised'); $Tk::postedMb = $w; $Tk::focus = $w->focusCurrent; $menu->activate('none'); $menu->GenerateMenuSelect; ...
If I change cursor or relief options in module - all OK.
But this is not true method.
Can I change these parameters from my perl program? I try it, but don't have positive result...

In reply to Perl::Tk and cursor in Menubutton by Khariton

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.