beetlebug▾
/

grid propagate

Gives or sets whether a container gets the size of its grid.

grid propagate CONTAINER ?BOOLEAN?

Description

With BOOLEAN 1, the default, the container sets its requested size to the size of its grid. With 0, the container keeps the requested size of its own options, such as -width and -height of a frame. With no BOOLEAN, gives the current value.

Returns

The current value, 0 or 1, or an empty string when BOOLEAN is given.

Examples

% frame .pr -width 50 -height 30
> grid propagate .pr 0
> frame .pr.big -width 80 -height 80
> grid .pr.big
> update
> list [grid propagate .pr] [winfo reqwidth .pr] [winfo reqheight .pr]
0 50 30

Errors

% grid propagate .pr x
expected boolean value but got "x"
-errorcode NONE

% grid propagate .pr 0 1
wrong # args: should be "grid propagate window ?boolean?"
-errorcode TCL WRONGARGS

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also