sub add_edit_popup { my ($mw, $obj) = @_; my $menu = $mw->Menu(-tearoff=>0, -menuitems=>[ [command=>'Start Term Info', -command=>[\&get_term_info_from_col_1_partial, $obj,]], '', [qw/command Copy/, -command=>['clipboardCopy', $obj,]], [qw/command Paste/, -command=>['clipboardPaste', $obj]], '', [command=>'Select All', -command=>[ sub { $_[0]->selectionRange(0, 'end'); }, $obj, ]], [command=>'Unselect All', -command=>[ sub { $_[0]->selectionClear; }, $obj, ]], ]); $obj->menu($menu); $obj->bind('<3>', ['PostPopupMenu', Ev('X'), Ev('Y'), ]); return $obj; } #### my $frame_GUI = $mw->toplevel; my $menubar = $frame_GUI->Menu(-type => 'menubar'); $frame_GUI->configure(-menu => $menubar); my $menu_export_import = $menubar->cascade(-label => '~Import/Export', -tearoff => 0); my $menu_export = $menu_export_import -> cascade(-label =>"Export/Print", -underline => 0, -tearoff => 0); $menu_export->command(-label => 'MS Word)', -command => sub{export_word()}); $menu_export->command(-label => "MS Excel)", -command => sub{export_html()}); my $menu_import = $menu_export_import -> cascade(-label =>"Import", -underline => 0, -tearoff => 0); $menu_import->command(-label => 'MS Word)',-command => sub{import_word()}); $menu_import->command(-label => 'MS Excel', -command => sub{import_excel()});