in reply to Hiding and Showing part of the Tk GUI

Hi!

You could use packForget():

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();
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.

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
    Lovely! Works like a charm! This is why I love Tk so much! :) So damn neat, and easy to do otherwise seemable tricky things.