summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/grid.n32
1 files changed, 29 insertions, 3 deletions
diff --git a/doc/grid.n b/doc/grid.n
index 3980898..0242b74 100644
--- a/doc/grid.n
+++ b/doc/grid.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: grid.n,v 1.8 2004/03/04 00:17:07 hobbs Exp $
+'\" RCS: @(#) $Id: grid.n,v 1.9 2004/06/21 14:40:15 dkf Exp $
'\"
.so man.macros
.TH grid n 8.5 Tk "Tk Built-In Commands"
@@ -340,7 +340,6 @@ minimum size. For example, if all rows or columns in a group have the
same weight, then each row or column will have the same size as the
largest row or column in the group.
.PP
-
.VS 8.5
For masters whose size is larger than the requested layout, the additional
space is apportioned according to the row and column weights. If all of
@@ -367,7 +366,6 @@ If propagation is disabled then grid will not set
the requested width and height of the master window.
This may be useful if, for example, you wish for a master
window to have a fixed size that you specify.
-
.SH "RESTRICTIONS ON MASTER WINDOWS"
.PP
The master for each slave must either be the slave's parent
@@ -390,5 +388,33 @@ will be highest in the stacking order.
The \fBgrid\fP command is based on ideas taken from the \fIGridBag\fP
geometry manager written by Doug. Stein, and the \fBblt_table\fR geometry
manager, written by George Howlett.
+.SH EXAMPLES
+A toplevel window containing a text widget and two scrollbars:
+.CS
+# Make the widgets
+toplevel .t
+text .t.txt \-wrap none \-xscroll {.t.h set} \-yscroll {.t.v set}
+scrollbar .t.v \-orient vertical \-command {.t.txt xview}
+scrollbar .t.h \-orient horizontal \-command {.t.txt xview}
+# Lay them out
+grid .t.txt .t.v \-sticky nsew
+grid .t.h \-sticky nsew
+# Tell the text widget to take all the extra room
+grid rowconfigure .t .t.txt -weight 1
+grid columnconfigure .t .t.txt -weight 1
+.CE
+.PP
+Three widgets of equal width:
+.CS
+button .b \-text "Foo"
+entry .e \-variable foo
+label .l \-text "This is a fairly long piece of text"
+grid .b .e .l \-sticky ew
+grid columnconfigure . "all" \-uniform allTheSame
+.CE
+
+.SH "SEE ALSO"
+pack(n), place(n)
+
.SH KEYWORDS
geometry manager, location, grid, cell, propagation, size, pack