These grid-related methods are defined on all widgets:
w
.grid_forget()
This method makes widget
disappear from the screen. It still exists, it just
isn't visible. You can use
w
.grid()
it to make it appear
again, but it won't remember its grid
options.
w
.grid_propagate()
Normally, all widgets
propagate their dimensions,
meaning that they adjust to fit the contents.
However, sometimes you want to force a widget to be
a certain size, regardless of the size of its
contents. To do this, call
where
w
.grid_propagate(0)
is the widget whose size you want to
force.w
w
.grid_remove()
This method is like
.grid_forget()
, but its grid
options are remembered, so if you
.grid()
it again, it will
use the same grid configuration options.