You can speak in Russian?

No, none at all. You'll need to translate the part in Cyrillic for me.

And, just in case there was any confusion, my "Your English is a lot better than my Russian. :-)" was intended as a good-humoured comment (hence the smiley). I hope it wasn't taken the wrong way.

I thinking about one method...

I also wanted to do something like that for other options. Here's my code (which appears immediately after the $mb->configure(-cursor => q{}); line):

my $file_menu = $mb->Cascade( -label => q{~File}, -tearoff => 0, -menuitems => [ [Separator => q{}], [Button => q{Exit}, -command => sub { exit }] ], ); $file_menu->cget(q{-menu})->configure( -borderwidth => 1, -activeborderwidth => 1, );

Working out how to do that took me a fair amount of investigation too. The method I used is still commented out in my script, so I'll post it here. It may provide some insights.

#say qq{\$file_menu: $file_menu}; #my @file_opts = $file_menu->configure(); #foreach my $opt (@file_opts) { # map { $_ //= q{undef} } @$opt; # say join qq{\t}, @$opt; #} #say qq{@{[$file_menu->cget(q{-menu})]}}; #my %file_menu_menu = %{$file_menu->cget(q{-menu})}; #foreach my $key (keys %file_menu_menu) { # say join q{ : }, $key, $file_menu_menu{$key}; #}

Finally, there's a newer (and, by all accounts, preferred) method of creating menu bars using the -menuitems option. I find it easier than the old method and have used it above. Examples of both methods are shown in the widget demo: under the Menus heading, compare item 1 (old method) with item 2 (new method).

-- Ken


In reply to Re^5: Perl::Tk and cursor in Menubutton by kcott
in thread 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.