TonyDonker has asked for the wisdom of the Perl Monks concerning the following question:
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(); ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Menu Items & Modules...
by PodMaster (Abbot) on Feb 21, 2005 at 10:27 UTC | |
by TonyDonker (Novice) on Feb 21, 2005 at 13:44 UTC | |
|
Re: Menu Items & Modules...
by castaway (Parson) on Feb 21, 2005 at 10:39 UTC | |
by TonyDonker (Novice) on Feb 21, 2005 at 11:43 UTC | |
by TonyDonker (Novice) on Feb 21, 2005 at 12:03 UTC |