I'd like to put a balloon on a menubar. I have the menu configured as/per "Mastering Perl/Tk" (copyright 2002) page 261, as shown below.
Shown is much simplified from my actual code. My menu works. My balloons also work for ordinary widgets.
What I can't figure out is how to attach a balloon to the menu. Help, please?
$mw->configure(-menu => my $menubar = $mw->Menu); # Build a menu bar for special options. map {$menubar->cascade( -label => '~' . $_->[0], menuitems => $_->[1]) +} ['First', menuitems]; # List of menu entries.... sub menuitems { [ ['command', 'Do This', -command => sub { print "foo" } ], + '', ['command', 'Do That, -command => sub { print "bar" } ], + '', ['command', 'Do Other', -command => sub { print "wtf" } ], ]; }; # Explain about the menu thingie. $balloon->attach( $mw->WHAT_SHOULD_I_PUT_HERE, -balloonmsg => 'Do something', -statusmsg => q{Tell much more here..}, );
In reply to Attaching balloons to menubar entries... by aplonis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |