O'Reilly logo

Tcl/Tk in a Nutshell by Jeff Tranter, Paul Raines

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

grid

grid operation [arg arg...]

Communicate with the grid geometry manager that arranges widgets in rows and columns inside of another window called the master window. The grid command can take the following forms:

grid slave [slave...] [options]

Same as grid configure.

grid bbox master [column row [column2 row2] ]

With no arguments, the bounding box of grid is returned consisting of a list of four integers: the pixel offset within the master window of the top left corner of the grid (x and y) and the pixel width and height of the grid. If just column and row are specified, only the bounding box for that cell is returned. If column2 and row2 are also specified, the bounding box spanning the rows and columns indicated is returned.

grid columnconfigure master index [option value...]

Query or set the column properties of the index column in geometry master master. If options are provided, index may be a list of column positions. Valid options are as follows:

-minsize size

Minimum width, in screen units, permitted for column.

-pad amount

Number of screen units in padding to add to the left and right of the widest window in column.

-weight integer

Relative weight for apportioning any extra space among columns. A weight of 0 indicates that the column will not deviate from its requested size. A column whose weight is 2 will grow at twice the rate as a column of weight 1.

grid configure slave [slave...] [options]

Configure how given slave windows should be managed by their grid geometry master. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required