Melly has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monkees,

I'm working on a Tk application, and, for one particular callback, I would like to be able to clear a frame of it's currently packed widgets, and repack it with a new set of widgets.

Any ideas?

Tom Melly, tom@tomandlu.co.uk

Replies are listed 'Best First'.
Re: Tk - how can I repack a frame?
by rinceWind (Monsignor) on Oct 20, 2003 at 11:12 UTC
    From the pod for Tk::pack:
    $slave->packForget
    Removes slave from the packing order for its master and unmaps its window. The slave will no longer be managed by the packer.

    Once you "forget" the widgets, you can "remember" them again with another call to pack. But, if you have finished with them completely, use $widget->destroy.

    Hope this helps

    rinceWind

    --
    I'm Not Just Another Perl Hacker