my $file_menu = $menubar->Menubutton(-text => "File", -activebackground => 'blue', -activeforeground => 'white', -tearoff => 0, -menuitems => [ [Button => '~Select', -command => \&select_file , -accelerator => ''], [Button => "~Edit",-state => 'disabled', -command => \&edit_file , -accelerator => '' ], [Button => '~Generate XML', -state => 'disabled',-command => \&gen_xml , -accel erator => ''], ["separator" => " "], [Button => "Exit", -command => sub {exit 0;} , -accelerator => 'ESC'] ])->pack(-side => 'left');