summaryrefslogtreecommitdiffstats
path: root/doc/grid.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/grid.n')
-rw-r--r--doc/grid.n72
1 files changed, 41 insertions, 31 deletions
diff --git a/doc/grid.n b/doc/grid.n
index d277c51..e40d47d 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.17 2007/10/26 20:13:23 dgp Exp $
+'\" RCS: @(#) $Id: grid.n,v 1.18 2007/10/29 16:04:13 dkf Exp $
'\"
.so man.macros
.TH grid n 8.5 Tk "Tk Built-In Commands"
@@ -15,7 +15,6 @@ grid \- Geometry manager that arranges widgets in a grid
.SH SYNOPSIS
\fBgrid \fIoption arg \fR?\fIarg ...\fR?
.BE
-
.SH DESCRIPTION
.PP
The \fBgrid\fR command is used to communicate with the grid
@@ -54,7 +53,7 @@ indicated is returned.
Query or set the column properties of the \fIindex\fR column of the
geometry master, \fImaster\fR.
The valid options are \fB\-minsize\fR, \fB\-weight\fR, \fB\-uniform\fR
-and \fB-pad\fR.
+and \fB\-pad\fR.
If one or more options are provided, then \fIindex\fR may be given as
a list of column indices to which the configuration options will operate on.
.VS 8.5
@@ -72,19 +71,21 @@ columns.
A weight of zero (0) indicates the column will not deviate from its requested
size. A column whose weight is two will grow at twice the rate as a column
of weight one when extra space is allocated to the layout.
-The \fB-uniform\fR option, when a non-empty value is supplied, places
+The \fB\-uniform\fR option, when a non-empty value is supplied, places
the column in a \fIuniform group\fR with other columns that have the
-same value for \fB-uniform\fR. The space for columns belonging to a
+same value for \fB\-uniform\fR. The space for columns belonging to a
uniform group is allocated so that their sizes are always in strict
-proportion to their \fB-weight\fR values. See
+proportion to their \fB\-weight\fR values. See
\fBTHE GRID ALGORITHM\fR below for further details.
-The \fB-pad\fR option specifies the number of screen units that will be
+The \fB\-pad\fR option specifies the number of screen units that will be
added to the largest window contained completely in that column when the
grid geometry manager requests a size from the containing window.
If only an option is specified, with no value,
the current value of that option is returned.
If only the master window and index is specified, all the current settings
-are returned in a list of "-option value" pairs.
+are returned in a list of
+.QW "\-option value"
+pairs.
.TP
\fBgrid configure \fIslave \fR?\fIslave ...\fR? ?\fIoptions\fR?
The arguments consist of the names of one or more slave windows
@@ -101,7 +102,9 @@ The following options are supported:
Insert the slave so that it occupies the \fIn\fRth column in the grid.
Column numbers start with 0. If this option is not supplied, then the
slave is arranged just to the right of previous slave specified on this
-call to \fIgrid\fR, or column "0" if it is the first slave. For each
+call to \fIgrid\fR, or column
+.QW 0
+if it is the first slave. For each
\fBx\fR that immediately precedes the \fIslave\fR, the column position
is incremented by one. Thus the \fBx\fR represents a blank column
for this row in the grid.
@@ -166,12 +169,15 @@ option may be used to position (or stretch) the slave within its cell.
\fBn\fR, \fBs\fR, \fBe\fR or \fBw\fR.
The string can optionally contains spaces or
commas, but they are ignored. Each letter refers to a side (north, south,
-east, or west) that the slave will "stick" to. If both \fBn\fR and \fBs\fR (or
-\fBe\fR and \fBw\fR) are specified, the slave will be stretched to fill the entire
+east, or west) that the slave will
+.QW stick
+to. If both \fBn\fR and \fBs\fR (or \fBe\fR and \fBw\fR) are
+specified, the slave will be stretched to fill the entire
height (or width) of its cavity. The \fBsticky\fR option subsumes the
combination of \fB\-anchor\fR and \fB\-fill\fR that is used by \fBpack\fR.
-The default is \fB{}\fR, which causes the slave to be centered in its cavity,
-at its requested size.
+The default is
+.QW "" ,
+which causes the slave to be centered in its cavity, at its requested size.
.LP
If any of the slaves are already managed by the geometry manager
then any unspecified options for them retain their previous values rather
@@ -190,13 +196,15 @@ default settings are used.
Returns a list whose elements are the current configuration state of
the slave given by \fIslave\fR in the same option-value form that
might be specified to \fBgrid configure\fR.
-The first two elements of the list are ``\fB\-in \fImaster\fR'' where
-\fImaster\fR is the slave's master.
+The first two elements of the list are
+.QW "\fB\-in \fImaster\fR"
+where \fImaster\fR is the slave's master.
.TP
\fBgrid location \fImaster x y\fR
Given \fIx\fR and \fIy\fR values in screen units relative to the master window,
the column and row number at that \fIx\fR and \fIy\fR location is returned.
-For locations that are above or to the left of the grid, \fB-1\fR is returned.
+For locations that are above or to the left of the grid, \fB\-1\fR is
+returned.
.TP
\fBgrid propagate \fImaster\fR ?\fIboolean\fR?
If \fIboolean\fR has a true boolean value such as \fB1\fR or \fBon\fR
@@ -214,7 +222,7 @@ Propagation is enabled by default.
Query or set the row properties of the \fIindex\fR row of the
geometry master, \fImaster\fR.
The valid options are \fB\-minsize\fR, \fB\-weight\fR, \fB\-uniform\fR
-and \fB-pad\fR.
+and \fB\-pad\fR.
If one or more options are provided, then \fIindex\fR may be given as
a list of row indices to which the configuration options will operate on.
.VS 8.5
@@ -232,19 +240,21 @@ rows.
A weight of zero (0) indicates the row will not deviate from its requested
size. A row whose weight is two will grow at twice the rate as a row
of weight one when extra space is allocated to the layout.
-The \fB-uniform\fR option, when a non-empty value is supplied, places
+The \fB\-uniform\fR option, when a non-empty value is supplied, places
the row in a \fIuniform group\fR with other rows that have the
-same value for \fB-uniform\fR. The space for rows belonging to a
+same value for \fB\-uniform\fR. The space for rows belonging to a
uniform group is allocated so that their sizes are always in strict
-proportion to their \fB-weight\fR values. See
+proportion to their \fB\-weight\fR values. See
\fBTHE GRID ALGORITHM\fR below for further details.
-The \fB-pad\fR option specifies the number of screen units that will be
+The \fB\-pad\fR option specifies the number of screen units that will be
added to the largest window contained completely in that row when the
grid geometry manager requests a size from the containing window.
If only an option is specified, with no value,
the current value of that option is returned.
If only the master window and index is specified, all the current settings
-are returned in a list of "-option value" pairs.
+are returned in a list of
+.QW "-option value"
+pairs.
.TP
\fBgrid remove \fIslave \fR?\fIslave ...\fR?
Removes each of the \fIslave\fRs from grid for its
@@ -327,11 +337,11 @@ equally.
When multiple rows or columns belong to a uniform group, the space
allocated to them is always in proportion to their weights. (A weight
of zero is considered to be 1.) In other words, a row or column
-configured with \fB-weight 1 -uniform a\fR will have exactly the same
-size as any other row or column configured with \fB-weight 1 -uniform
-a\fR. A row or column configured with \fB-weight 2 -uniform b\fR will
-be exactly twice as large as one that is configured with \fB-weight 1
--uniform b\fR.
+configured with \fB\-weight 1 \-uniform a\fR will have exactly the same
+size as any other row or column configured with \fB\-weight 1 \-uniform
+a\fR. A row or column configured with \fB\-weight 2 \-uniform b\fR will
+be exactly twice as large as one that is configured with \fB\-weight 1
+\-uniform b\fR.
.PP
More technically, each row or column in the group will have a size
equal to \fIk*weight\fR for some constant \fIk\fR. The constant
@@ -379,7 +389,7 @@ In addition, all slaves in one call to \fBgrid\fR must have the same master.
If the master for a slave is not its parent then you must make sure
that the slave is higher in the stacking order than the master.
Otherwise the master will obscure the slave and it will appear as
-if the slave hasn't been managed correctly.
+if the slave has not been managed correctly.
The easiest way to make sure the slave is higher than the master is
to create the master window first: the most recently created window
will be highest in the stacking order.
@@ -404,7 +414,9 @@ scrollbar .t.h \-orient horizontal \-command {.t.txt xview}
\fBgrid columnconfigure\fR .t .t.txt \-weight 1
.CE
.PP
-Three widgets of equal width, despite their different "natural" widths:
+Three widgets of equal width, despite their different
+.QW natural
+widths:
.CS
button .b \-text "Foo"
entry .e \-variable foo
@@ -412,9 +424,7 @@ label .l \-text "This is a fairly long piece of text"
\fBgrid\fR .b .e .l \-sticky ew
\fBgrid columnconfigure\fR . "all" \-uniform allTheSame
.CE
-
.SH "SEE ALSO"
pack(n), place(n)
-
.SH KEYWORDS
geometry manager, location, grid, cell, propagation, size, pack