diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2024-01-25 17:50:00 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2024-01-25 17:50:00 (GMT) |
commit | 2f4b99c2d164ebbc4b182ae7eb1f0d635aea6b87 (patch) | |
tree | 8e669fafc852c6743d5f926fabcf25a5d4155496 /doc/grid.n | |
parent | dbd87b5ee2ea675c3ad1c2c74c48c8523498693e (diff) | |
download | tk-2f4b99c2d164ebbc4b182ae7eb1f0d635aea6b87.zip tk-2f4b99c2d164ebbc4b182ae7eb1f0d635aea6b87.tar.gz tk-2f4b99c2d164ebbc4b182ae7eb1f0d635aea6b87.tar.bz2 |
Another round of small fixes, especially spelling errors...
Diffstat (limited to 'doc/grid.n')
-rw-r--r-- | doc/grid.n | 85 |
1 files changed, 46 insertions, 39 deletions
@@ -85,7 +85,7 @@ If only an option is specified, with no value, the current value of that option is returned. If only the container window and index is specified, all the current settings are returned in a list of -.QW "\-option value" +.QW "\fI\-option value\fR" pairs. .\" METHOD: configure .TP @@ -100,6 +100,7 @@ location of a \fIwindow\fR, as described in the \fBRELATIVE PLACEMENT\fR section, below. The following options are supported: .RS +.\" OPTION: -column .TP \fB\-column \fIn\fR . @@ -112,6 +113,7 @@ if it is the first window. For each \fBx\fR that immediately precedes the \fIwindow\fR, the column position is incremented by one. Thus the \fBx\fR represents a blank column for this row in the grid. +.\" OPTION: -columnspan .TP \fB\-columnspan \fIn\fR . @@ -119,12 +121,14 @@ Insert the window so that it occupies \fIn\fR columns in the grid. The default is one column, unless the window name is followed by a \fB\-\fR, in which case the columnspan is incremented once for each immediately following \fB\-\fR. +.\" OPTION: -in .TP \fB\-in \fIcontainer\fR . Insert the window(s) in the container window given by \fIcontainer\fR. The default is the first window's parent window. +.\" OPTION: -ipadx .TP \fB\-ipadx \fIamount\fR . @@ -133,6 +137,7 @@ leave on each side of the content. This is space is added inside the content border. The \fIamount\fR must be a valid screen distance, such as \fB2\fR or \fB.5c\fR. It defaults to 0. +.\" OPTION: -ipady .TP \fB\-ipady \fIamount\fR . @@ -140,6 +145,7 @@ The \fIamount\fR specifies how much vertical internal padding to leave on the top and bottom of the content. This space is added inside the content border. The \fIamount\fR defaults to 0. +.\" OPTION: -padx .TP \fB\-padx \fIamount\fR . @@ -149,6 +155,7 @@ leave on each side of the content, in screen units. of two values to specify padding for left and right separately. The \fIamount\fR defaults to 0. This space is added outside the content border. +.\" OPTION: -pady .TP \fB\-pady \fIamount\fR . @@ -158,6 +165,7 @@ leave on the top and bottom of the content, in screen units. of two values to specify padding for top and bottom separately. The \fIamount\fR defaults to 0. This space is added outside the content border. +.\" OPTION: -row .TP \fB\-row \fIn\fR . @@ -166,6 +174,7 @@ Row numbers start with 0. If this option is not supplied, then the content is arranged on the same row as the previous content specified on this call to \fBgrid\fR, or the next row after the highest occupied row if this is the first content. +.\" OPTION: -rowspan .TP \fB\-rowspan \fIn\fR . @@ -174,6 +183,7 @@ The default is one row. If the next \fBgrid\fR command contains \fB^\fR characters instead of \fIcontent\fR that line up with the columns of this \fIcontent\fR, then the \fBrowspan\fR of this \fIcontent\fR is extended by one. +.\" OPTION: -sticky .TP \fB\-sticky \fIstyle\fR . @@ -219,8 +229,8 @@ default settings are used. .RS .PP .VS "TIP 518" -If the last content window of the container becomes unmanaged, this will also send -the virtual event \fB<<NoManagedChild>>\fR to the container; the container +If the last content window of the container becomes unmanaged, this will also +send the virtual event \fB<<NoManagedChild>>\fR to the container; the container may choose to resize itself (or otherwise respond) to such a change. .VE "TIP 518" .RE @@ -238,10 +248,10 @@ where \fIcontainer\fR is the windows's container window. .TP \fBgrid location \fIwindow x y\fR . -Given \fIx\fR and \fIy\fR values in screen units relative to the container 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. +Given \fIx\fR and \fIy\fR values in screen units relative to the container +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. .\" METHOD: propagate .TP \fBgrid propagate \fIwindow\fR ?\fIboolean\fR? @@ -255,7 +265,10 @@ In either of these cases an empty string is returned. If \fIboolean\fR is omitted then the command returns \fB0\fR or \fB1\fR to indicate whether propagation is currently enabled for \fIwindow\fR. +.RS +.PP Propagation is enabled by default. +.RE .\" METHOD: rowconfigure .TP \fBgrid rowconfigure \fIwindow index \fR?\fI\-option value...\fR? @@ -267,9 +280,9 @@ 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. Indices may be integers, window names or the keyword \fIall\fR. For \fIall\fR -the options apply to all rows currently occupied by content windows. For -a window name, that window must be a content window of this container and the options -apply to all rows currently occupied by the container window. +the options apply to all rows currently occupied by content windows. For a +window name, that window must be a content window of this container and the +options apply to all rows currently occupied by the container window. The \fB\-minsize\fR option sets the minimum size, in screen units, that will be permitted for this row. The \fB\-weight\fR option (an integer value) @@ -307,9 +320,9 @@ geometry manager, the previous values are retained. .RS .PP .VS "TIP 518" -If the last content window of the container becomes unmanaged, this will also send -the virtual event \fB<<NoManagedChild>>\fR to the container; the container -may choose to resize itself (or otherwise respond) to such a change. +If the last content window of the container becomes unmanaged, this will also +send the virtual event \fB<<NoManagedChild>>\fR to the container; the +container may choose to resize itself (or otherwise respond) to such a change. .VE "TIP 518" .RE .\" METHOD: size @@ -341,21 +354,15 @@ relative to other \fIcontent\fRs in the same grid command, and the presence of the characters \fB\-\fR, \fBx\fR, and \fB^\fR in \fBgrid\fR command where \fIcontent\fR names are normally expected. .RS -.TP -\fB\-\fR -. +.IP \fB\-\fR This increases the \fB\-columnspan\fR of the \fIcontent\fR to the left. Several -\fB\-\fR's in a row will successively increase the number of columns spanned. A \fB\-\fR -may not follow a \fB^\fR or a \fBx\fR, nor may it be the first \fIcontent\fR -argument to \fBgrid configure\fR. -.TP -\fBx\fR -. +\fB\-\fR's in a row will successively increase the number of columns spanned. +A \fB\-\fR may not follow a \fB^\fR or a \fBx\fR, nor may it be the first +\fIcontent\fR argument to \fBgrid configure\fR. +.IP \fBx\fR This leaves an empty column between the \fIcontent\fR on the left and the \fIcontent\fR on the right. -.TP -\fB^\fR -. +.IP \fB^\fR This extends the \fB\-rowspan\fR of the \fIcontent\fR above the \fB^\fR's in the grid. The number of \fB^\fR's in a row must match the number of columns spanned by the \fIcontent\fR above it. @@ -372,8 +379,8 @@ away from the layout as needed. For the final step, each content is positioned in its row(s) and column(s) based on the setting of its \fIsticky\fR flag. .PP -To compute the minimum size of a layout, the grid geometry manager -first looks at all content whose \fB\-columnspan\fR and \fB\-rowspan\fR values are one, +To compute the minimum size of a layout, the grid geometry manager first looks +at all content whose \fB\-columnspan\fR and \fB\-rowspan\fR values are one, and computes the nominal size of each row or column to be either the \fIminsize\fR for that row or column, or the sum of the \fIpad\fRding plus the size of the largest content, whichever is greater. After that @@ -454,17 +461,17 @@ 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 yview} -scrollbar .t.h \-orient horizontal \-command {.t.txt xview} +text .t.txt -wrap none -xscroll {.t.h set} -yscroll {.t.v set} +scrollbar .t.v -orient vertical -command {.t.txt yview} +scrollbar .t.h -orient horizontal -command {.t.txt xview} # Lay them out -\fBgrid\fR .t.txt .t.v \-sticky nsew -\fBgrid\fR .t.h \-sticky nsew +\fBgrid\fR .t.txt .t.v -sticky nsew +\fBgrid\fR .t.h -sticky nsew # Tell the text widget to take all the extra room -\fBgrid rowconfigure\fR .t .t.txt \-weight 1 -\fBgrid columnconfigure\fR .t .t.txt \-weight 1 +\fBgrid rowconfigure\fR .t .t.txt -weight 1 +\fBgrid columnconfigure\fR .t .t.txt -weight 1 .CE .PP Three widgets of equal width, despite their different @@ -472,12 +479,12 @@ Three widgets of equal width, despite their different widths: .PP .CS -button .b \-text "Foo" -entry .e \-textvariable foo ; set foo "Hello World!" -label .l \-text "This is a fairly long piece of text" +button .b -text "Foo" +entry .e -textvariable foo ; set foo "Hello World!" +label .l -text "This is a fairly long piece of text" -\fBgrid\fR .b .e .l \-sticky ew -\fBgrid columnconfigure\fR . "all" \-uniform allTheSame +\fBgrid\fR .b .e .l -sticky ew +\fBgrid columnconfigure\fR . "all" -uniform allTheSame .CE .SH "SEE ALSO" pack(n), place(n) |