Next / Previous / Contents / TCC Help System / NM Tech homepage

3.2. Other grid management methods

These grid-related methods are defined on all widgets:

w.grid_forget()

This method makes widget w disappear from the screen. It still exists, it just isn't visible. You can use .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 w.grid_propagate(0) where w is the widget whose size you want to force.

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.