Wednesday, March 9, 2016

Tkinter make a widget invisible or visible

The "disable" function greys out a check button and even a label, but is it possible to temporarily make those disappear off a screeen and reappear? So far what I've found seems to indicate that there are a couple of options. There seem to be some utilities for undoing packing in such a way that it's possible to easily redo it. It might also be possible to play with front and back layering to cover and uncover items on a GUI. Here are some links:

This is a nice discussion of these two methods: http://stackoverflow.com/questions/3819354/in-tkinter-is-there-any-way-to-make-a-widget-not-visible

A terse version of the same answer (it points to the first link as already answered): http://stackoverflow.com/questions/10267465/showing-and-hiding-widgets

Only slightly related, here's a cautionary tale about a guy who made a mess of his frame managers and how it was fixed: http://stackoverflow.com/questions/30061100/tkinter-self-grid-making-widgets-invisible