mpersico has asked for the wisdom of the Perl Monks concerning the following question:
my $mw = new MainWindow( -title => "@{$G{reexec}}"); $mw->configure(-menu => my $menubar = $mw->Menu); my $nb = $mw->NoteBook(-width => $maxwidth)-> pack(-expand=>1, -fill => 'both'); my $filemenuitem = $menubar->cascade(-label=>'~File'); my $reexecmenuitem = $menubar->command(-label=>'~Re-exec', -command => \&reexec); my $closetabmenuitem = $menubar->command(-label => '~Close Tab', -command => sub { my $raised_page_name = $nb->raised(); my $raised_page_menu_index = $pages{$raised_page +_name}; $nb->delete($raised_page_name); ## No inherited delete here:? $filemenuitem->delete($raised_page_menu_index); });
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk Menu Cascade has no delete method?
by zentara (Cardinal) on Oct 17, 2012 at 17:33 UTC |