beetlebug▾
/

wm grid

Gives or sets the grid of a toplevel, so that its size goes in steps of a cell.

wm grid WINDOW ?BASEWIDTH BASEHEIGHT WIDTHINC HEIGHTINC?

Description

With a grid, wm geometry gives and sets the size in cells: BASEWIDTH and BASEHEIGHT cells for the requested size, and one step of WIDTHINC or HEIGHTINC pixels for each cell more. A text or a listbox with -setgrid 1 sets the grid. Four empty values remove the grid. ztk stores the values with no check.

Returns

A list of four values, or an empty string.

Examples

% toplevel .t
> wm grid .t 1 1 10 10
> wm grid .t
1 1 10 10

% wm grid .t 1 1 10 10
> wm grid .t {} {} {} {}
> wm grid .t

Errors

ztk stores each value with no check.

Facts

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