[Tkinter-discuss] pack equivalent of grid_remove(), eg. pack_remove() ?
kw at codebykevin.com
Thu Dec 9 15:37:33 CET 2010
On 12/9/10 9:25 AM, python at bdurham.com wrote:
> Is there a pack equivalent of the grid_remove() method where a widget's
> original pack() settings are restored on a re-pack()?
> Use case: When I show a packed widget that has been hidden via
> pack_forget(), I would like to have the widget re-packed with its
> original pack settings when I issue the widget.pack() show request.
No, there isn't. You have to be careful with the packing order for
pack_forget() to work--this works best if you limit its use to the last
widget group packed. Otherwise, it may be packed in a different
location, with surprising results.
Code by Kevin
More information about the Tkinter-discuss