[Peter Spjuth] 2004-01-12 : This page is for collecting and discussing ideas about improving the [grid] geometry manager. If you who feel that anything here is a really good idea you are encouraged to write a [TIP] for it. Previous TIPs about grid are 37 [http://www.tcl.tk/cgi-bin/tct/tip/37.html], 146 [http://www.tcl.tk/cgi-bin/tct/tip/146.html] and 147 [http://www.tcl.tk/cgi-bin/tct/tip/147.html]. ---- '''Weight on a slave''' This is a shortcut for a rather common grid case. To make a widget fill up its space becomes a one-liner. frame .f text .f.t grid .f.t -sticky news -weight 1 If a slave has both "n" and "s" in its -sticky, its -weight is transferred to the row(s) it occupies. If a slave has both "w" and "e" in its -sticky, its -weight is transferred to the column(s) it occupies. If different slaves or a row/columnconfigure want to set contradicting weights (not counting 0), this is an error. ---- '''Setting up slave defaults in a master''' grid slavedefaults .f -padx 2 -pady 2 -sticky news Affects any slaves added to that master in the future. Maybe even: grid slavedefaults all -padx 2 -pady 2 -sticky news ---- '''Scrolled grid''' frame .f scrollbar .sbx -command "grid xview .f" scrollbar .sby -command "grid yview .f" grid masterconfigure .f -xscrollcommand ".sbx set" -yscrollcommand ".sby set" This becomes a way to do a scrolled frame without the frame-in-canvas trick. ---- [Category Suggestions]