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).
|