in reply to Hiding and Showing part of the Tk GUI
You could use packForget():
packForget() removes the widget from the packing order. If you repack it later, it appears at the end of the packing order. You can get the pack configuration with @conf = $frame->packInfo(). The same is possible with grid.use Tk; my $top = new MainWindow; my $frame = $top->Frame(); $frame->Label(-text=>"Can you see me?")->pack(); $top->Button(-text=>"Hide",-command=>sub{$frame->packForget()})->pack( +); $top->Button(-text=>"Show",-command=>sub{$frame->pack()})->pack(); $frame->pack(); MainLoop();
Regards, mawe
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hiding and Showing part of the Tk GUI
by Ace128 (Hermit) on Jul 19, 2005 at 05:17 UTC |