grid bbox
Gives the box of the grid, of a cell, or of a block of cells, in pixels.
grid bbox CONTAINER ?COLUMN ROW? ?COLUMN2 ROW2?
Description
With no cell, gives the box of the whole grid. With one cell, gives the box of that cell. With two cells, gives the box of the block from the one cell to the other. The values are the x and the y of the top left corner in the container, the width, and the height.
Returns
A list of four integers: x, y, width, and height.
Examples
% frame .bb
> foreach n {a b c d} { frame .bb.$n -width 20 -height 10 }
> grid .bb.a .bb.b
> grid .bb.c .bb.d
> pack .bb
> update
> list [grid bbox .bb] [grid bbox .bb 1 0] [grid bbox .bb 0 0 1 1]
{0 0 40 20} {20 0 20 10} {0 0 40 20}
Errors
% grid bbox .bb 0
wrong # args: should be "grid bbox master ?column row ?column row??"
-errorcode NONE
% grid bbox .bb.none
bad window path name ".bb.none"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1