- grid forget slave ?slave ...?
If all widgets contained in a grid are unmapped using destroy or grid forget, there might still be row or column states set by grid rowconfigure or grid columnconfigure. Their existance might be observed by grid size not returning 0 0:
% frame .f % grid size .f 0 0 % grid rowconfigure .f 1 -weight 1 % grid size .f 0 2 % grid rowconfigure .f 1 -weight 0 % grid size .f 0 0Here is a procedure to clear all grid memory:
proc gridClear {path} { grid forget {*}[winfo children $path] lassign [grid size $path] cols rows for {set row 0} {$row < $rows} {incr row} { grid rowconfigure $path $row -minsize 0 -weight 0 -uniform "" -pad 0 } for {set col 0} {$col < $cols} {incr col} { grid columnconfigure $path $col -minsize 0 -weight 0 -uniform "" -pad 0 } }A better (and more future save in respect of eventual new options) way is to destroy and recreate the parent:
% destroy .f % frame .f