| Shiri Shem-Tov 2004-09-02, 3:58 pm |
| Hello,
I run the following menu example:
my $mw = MainWindow->new;
$mw->title('Menubutton');
$menub = $mw->Menubutton(-text=> "Menubuton", -tearoff=> 0)->pack();
$menu1 = $menub->menu->Menu;
foreach (qw/one two three/) {
$menu1->add('command', -label => $_);
}
$menu2 = $menub->menu->Menu;
foreach (qw/A B C/) {
$menu2->radiobutton(-label => $_);
}
$menub->cascade(-label=> "Numbers");
$menub->cascade(-label=> "Letters");
$menub->entryconfigure("Numbers", -menu=> $menu1);
$menub->entryconfigure("Letters", -menu=> $menu2);
MainLoop;
When clicking on the menu button - the menu is opened, and the first
entry ("Numbers") is selected by default. The result is that "Numbers"
menu is also opened by default.
I use Tk-804.027 (on Solaris). I tried to run it with Tk-4.0, and
there "Numbers" menu was not opened by default.
I also tried to run Tk-804.027 on PC, and there it also looked ok
("Numbers" menu was not opened by default).
Is this a bug, a feature? Is there a way to control this?
Thanks,
Shiri.
|