grid rowconfigure
Gives or sets the options of one or more rows of a grid.
grid rowconfigure CONTAINER INDEX
grid rowconfigure CONTAINER INDEX OPTION
grid rowconfigure CONTAINER INDEX OPTION VALUE ?OPTION VALUE ...?
Description
The same command as grid columnconfigure, for rows. INDEX is a row number, a list of row numbers, all, or the name of a widget in the grid for each of its rows.
Options
| Option | Type | Default | Description |
|---|---|---|---|
-minsize | screen distance | 0 | The smallest height of the row. |
-pad | screen distance | 0 | Extra height of the row, half above and half below its widgets. |
-uniform | string | empty | A group name: the rows of one group have the same height. |
-weight | integer | 0 | The share of the extra height of the container that the row gets. |
-minsize DISTANCE
The smallest height of the row.
The row is at least DISTANCE tall, also with no widget in it.
% frame .rmn
> frame .rmn.a -width 10 -height 10
> grid .rmn.a
> grid rowconfigure .rmn 0 -minsize 40
> pack .rmn
> update
> winfo reqheight .rmn
40% grid rowconfigure .rmn 0 -minsize x
bad screen distance "x"
-errorcode NONE-pad DISTANCE
Extra height of the row, half above and half below its widgets.
The row is DISTANCE taller than its tallest widget. The value must not be negative.
% frame .rpd
> frame .rpd.a -width 10 -height 10
> grid .rpd.a
> grid rowconfigure .rpd 0 -pad 6
> pack .rpd
> update
> winfo reqheight .rpd
16% grid rowconfigure .rpd 0 -pad -1
invalid arg "-pad": should be non-negative
-errorcode NONE-uniform GROUP
A group name: the rows of one group have the same height.
Each row with the same GROUP gets the height of the tallest row of the group, in proportion to its -weight.
% frame .run
> frame .run.a -width 10 -height 10
> frame .run.b -width 10 -height 30
> grid .run.a
> grid .run.b
> grid rowconfigure .run {0 1} -uniform g
> pack .run
> update
> winfo reqheight .run
60Each string is a valid group name.
-weight N
The share of the extra height of the container that the row gets.
When the container is taller than the grid, the extra height goes to the rows in proportion to their weights. The value must not be negative.
% frame .rwt
> grid rowconfigure .rwt all -weight 3
> frame .rwt.a
> grid .rwt.a
> grid rowconfigure .rwt .rwt.a -weight 4
> grid rowconfigure .rwt 0 -weight
4% grid rowconfigure .rwt 0 -weight -1
invalid arg "-weight": should be non-negative
-errorcode NONEReturns
A list of options and values, one value, or an empty string.
Examples
% frame .rc
> grid rowconfigure .rc 0 -weight 2 -minsize 30 -pad 4 -uniform u
> grid rowconfigure .rc 0
-minsize 30 -pad 4 -uniform u -weight 2
Errors
% grid rowconfigure .rc x -weight 1
illegal index "x"
-errorcode NONE
% grid rowconfigure .rc 0 -weight 1 -pad
wrong # args: should be "grid rowconfigure master index ?-option value ...?"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1