beetlebug▾
/

grid info

Gives the grid options of a widget.

grid info WINDOW

Description

Gives a list of option and value pairs: -in, -column, -row, -columnspan, -rowspan, -ipadx, -ipady, -padx, -pady, and -sticky, in that order. A widget that is not in a grid gives an empty list.

Returns

A list of options and values, or an empty list.

Examples

% frame .if
> frame .if.a
> grid .if.a -row 2 -column 3 -sticky nsew
> grid info .if.a
-in .if -column 3 -row 2 -columnspan 1 -rowspan 1 -ipadx 0 -ipady 0 -padx 0 -pady 0 -sticky nesw

% frame .if2
> grid info .if2

Errors

% grid info .if3 x
wrong # args: should be "grid info window"
-errorcode TCL WRONGARGS

Facts

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

See also