sorry posted the wrong menu code. Please refer to the following code.my $file_menu = $menubar->Menubutton(-text => "File", -activebackground => 'blue', -activeforeground => 'white', -tearoff => 0, -menuitems => [ [Button => '~Sele +ct', -command => \&select_file , -accelerator => '<Ctrl-s>'], [Button => "~Edit +",-state => 'disabled', -command => \&edit_file , -accelerator => '<Ctrl-e>' ], [Button => '~Gene +rate XML', -state => 'disabled',-command => \&gen_xml , -accel erator => '<Ctrl-x>'], ["separator" => " + "], [Button => "Exit +", -command => sub {exit 0;} , -accelerator => 'ESC'] ])->pack(-side => + 'left');
In reply to Re: Perl/TK: enabling a disable menu item
by chimni
in thread Perl/TK: enabling a disable menu item
by chimni
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |