In module event.pm the function event_function is defined (a fragment):use Tk 800; use Tk::Dialog; use event; use icit_messages; $top = new MainWindow; $top->title("As2Con Gui"); my $frame = $top->Frame(qw/-width 800 -height 300 -background white/)- +>pack; create_gui(); sub create_gui { $menubar = $top->Menu; $status_menu->command(-label => "~Events", -command => sub { even +t_function(\$frame) }); $status_menu->command(-label => "M~essages", -command => sub { m +essages_function(\$frame) }); ....
In module icit_messages.pm the function messages_function is defined (a fragment):sub event_function { my $top = shift; if ($view) { $view->packForget } $view = $$top->Frame(qw/-width 800 -height 400 -background whi +te/)->pack(-expand => 1, -fill => 'both'); ...
The problem is when I select menu item Events everything goes OK in the current window, but when I select menu item Messages after I have selected Events the current window is enlarged and the output of Messages is below the output of Events in the same window. This problem does not occur when I select Messages or Events two times after each other...sub messages_function { my $top = shift; if ($view) { $view->packForget; } $view = $$top->Frame(qw/-width 400 -height 400 -background white/)-> +pack(); ...
In reply to Menu Items & Modules... by TonyDonker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |