NAME
       grid - Geometry manager that arranges widgets in a grid

SYNOPSIS
       grid option arg ?arg ...?


DESCRIPTION
       The  grid  command  is  used  to communicate with the grid
       geometry manager that arranges widgets in rows and columns
       inside  of  another window, called the geometry master (or
       master window).  The grid command can have any of  several
       forms, depending on the option argument:

       grid slave ?slave ...? ?options?
              If the first argument to grid is a window name (any
              value starting with ``.''),  then  the  command  is
              processed in the same way as grid configure.

       grid bbox master ?column row? ?column2 row2?
              With  no arguments, the bounding box (in pixels) of
              the grid is returned.  The return value consists of
              4  integers.   The  first  two are the pixel offset
              from the master window (x then y) of  the  top-left
              corner of the grid, and the second two integers are
              the width and height of the grid, also  in  pixels.
              If a single column and row is specified on the com-
              mand line, then the bounding box for that  cell  is
              returned,  where the top left cell is numbered from
              zero.  If both column and row arguments are  speci-
              fied,  then  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  of  the geometry master, master.  The valid
              options are -minsize, -weight and -pad.  If one  or
              more  options are provided, then index may be given
              as a list of column indeces to which the configura-
              tion  options will operate on.  The -minsize option
              sets the minimum size, in screen units,  that  will
              be  permitted  for this column.  The -weight option
              (an integer value) sets  the  relative  weight  for
              apportioning  any  extra  spaces  among columns.  A
              weight of zero (0) indicates the  column  will  not
              deviate  from  its  requested size.  A column whose
              weight is two will grow at twice the rate as a col-
              umn  of weight one when extra space is allocated to
              the layout.  The -pad option specifies  the  number
              of  screen  units that will be added to the largest
              window contained completely in that column when the
              grid geometry manager requests a size from the con-
              taining window.  If only an  option  is  specified,
              with  no value, the current value of that option is
              returned.  If only the master window and  index  is
              specified, all the current settings are returned in
              an list of "-option value" pairs.

       grid configure slave ?slave ...? ?options?
              The arguments consist of the names of one  or  more
              slave  windows  followed by pairs of arguments that
              specify how to manage the slaves.   The  characters
              -,   x  and ^, can be specified instead of a window
              name to alter the default location of a  slave,  as
              described  in  the  ``RELATIVE PLACEMENT'' section,
              below.  The following options are supported:

              -column n
                     Insert the slave so that it occupies the nth
                     column  in  the  grid.  Column numbers start
                     with 0.  If this  option  is  not  supplied,
                     then the slave is arranged just to the right
                     of previous slave specified on this call  to
                     grid,  or  column  "0"  if  it  is the first
                     slave.  For each x that immediately precedes
                     the  slave,  the  column  position is incre-
                     mented by one.   Thus  the  x  represents  a
                     blank column for this row in the grid.

              -columnspan n
                     Insert  the  slave  so  that  it  occupies n
                     columns in the grid.   The  default  is  one
                     column,  unless  the window name is followed
                     by a -, in  which  case  the  columnspan  is
                     incremented  once  for each immediately fol-
                     lowing -.

              -in other
                     Insert the slave(s)  in  the  master  window
                     given  by  other.   The default is the first
                     slave's parent window.

              -ipadx amount
                     The amount  specifies  how  much  horizontal
                     internal  padding  to  leave on each side of
                     the slave(s).  This is space is added inside
                     the  slave(s)  border.  The amount must be a
                     valid screen distance, such as 2 or .5c.  It
                     defaults to 0.

              -ipady amount
                     The   amount  specifies  how  much  vertical
                     internal padding to leave on on the top  and
                     bottom of the slave(s).  This space is added
                     inside  the  slave(s)  border.   The  amount
                     defaults to 0.
              -padx amount
                     The  amount  specifies  how  much horizontal
                     external padding to leave on  each  side  of
                     the  slave(s),  in screen units.  The amount
                     defaults to 0.  This space is added  outside
                     the slave(s) border.

              -pady amount
                     The   amount  specifies  how  much  vertical
                     external padding to leave  on  the  top  and
                     bottom  of  the  slave(s),  in screen units.
                     The amount defaults to  0.   This  space  is
                     added outside the slave(s) border.

              -row n Insert the slave so that it occupies the nth
                     row in the grid.  Row numbers start with  0.
                     If  this  option  is  not supplied, then the
                     slave is arranged on the  same  row  as  the
                     previous  slave  specified  on  this call to
                     grid, or the first unoccupied row if this is
                     the first slave.

              -rowspan n
                     Insert  the slave so that it occupies n rows
                     in the grid.  The default is  one  row.   If
                     the  next grid command contains ^ characters
                     instead of slaves  that  line  up  with  the
                     columns  of  this slave, then the rowspan of
                     this slave is extended by one.

              -sticky style
                     If  a  slave's  cell  is  larger  than   its
                     requested  dimensions,  this  option  may be
                     used to  position  (or  stretch)  the  slave
                     within  its  cell.   Style  is a string that
                     contains zero or more of the  characters  n,
                     s,  e  or w.  The string can optionally con-
                     tains  spaces  or  commas,  but   they   are
                     ignored.   Each  letter  refers  to  a  side
                     (north, south, east, or west) that the slave
                     will  "stick" to.  If both n and s (or e and
                     w)  are  specified,  the   slave   will   be
                     stretched  to  fill  the  entire  height (or
                     width) of its  cavity.   The  sticky  option
                     subsumes  the  combination  of  -anchor  and
                     -fill that is used by pack.  The default  is
                     {}, which causes the slave to be centered in
                     its cavity, at its requested size.

              If any of the slaves are  already  managed  by  the
              geometry  manager  then any unspecified options for
              them  retain  their  previous  values  rather  than
              receiving default values.
       grid forget slave ?slave ...?
              Removes each of the slaves from grid for its master
              and unmaps  their  windows.   The  slaves  will  no
              longer  be  managed  by  the grid geometry manager.
              The configuration options for that window are  for-
              gotten,  so  that if the slave is managed once more
              by the grid geometry manager, the  initial  default
              settings are used.

       grid info slave
              Returns  a list whose elements are the current con-
              figuration state of the slave given by slave in the
              same  option-value  form that might be specified to
              grid configure.  The first two elements of the list
              are ``-in master'' where master is the slave's mas-
              ter.

       grid location master x y
              Given  x and y values in screen units  relative  to
              the  master  window,  the  column and row number at
              that x and y location is returned.   For  locations
              that  are  above  or to the left of the grid, -1 is
              returned.

       grid propagate master ?boolean?
              If boolean has a true boolean value such as 1 or on
              then  propagation is enabled for master, which must
              be a  window  name  (see  ``GEOMETRY  PROPAGATION''
              below).   If boolean has a false boolean value then
              propagation is disabled for master.  In  either  of
              these  cases  an  empty  string  is  returned.   If
              boolean is omitted then the command returns 0 or  1
              to   indicate   whether  propagation  is  currently
              e  name  (se           be  permitted  for this column.  The -weight option
              (an integer value) sets  the  relative  weight  for
              apportioning  any  extra  spaces  among columns.  A
              weight of zero (0) indicates the  column  will  not
              deviate  from  its  requested size.  A column whose
              weight is two will grow at twice the rate as a col-
              umn  of weight one when extra space is allocated to
              the layout.  The -pad option specifies  the  number
              of  screen  units that will be added to the largest
              window contained completely in that column when the
              grid geometry manager requests a size from the con-
              taining window.  If only an  option  is  specified,
              with  no value, the current value of that option is
              returned.  If only the master window and  index  is
              specified, all the current settings are returned in
              an list of "-option value" pairs.

       grid configure slave ?slave ...? ?options?
              The arguments consist of the names of one  or  more
              slave  windows  followed by pairs of arguments that
              specify how to manage the slaves.   The  characters
              -,   x  and ^, can be specified instead of a window
              name to alter the default location of a  slave,  as
              described  in  the  ``RELATIVE PLACEMENT'' section,
              below.  The following options are supported:

              -column n
                     Insert the slave so that it occupies the nth
                     column  in  the  grid.  Column numbers start
                     with 0.  If this  option  is  not  supplied,
                     then the slave is arranged just to the right
                     of previous slave specified on this call  to
                     grid,  or  column  "0"  if  it  is the first
                     slave.  For each x that immediately precedes
                     the  slave,  the  column  position is incre-
                     mented by one.   Thus  the  x  represents  a
                     blank column for this row in the grid.

              -columnspan n
                     Insert  the  slave  so  that  it  occupies n
                     columns in the grid.   The  default  is  one
                     column,  unless  the window name is followed
                     by a -, in  which  case  the  columnspan  is
                     incremented  once  for each immediately fol-
                     lowing -.

              -in other
                     Insert the slave(s)  in  the  master  window
                     given  by  other.   The default is the first
                     slave's parent window.

              -ipadx amount
                     The amount  specifies  how  much  horizontal
                     internal  padding  to  leave on each side of
                     the slave(s).  This is space is added inside
                     the  slave(s)  border.  The amount must be a
                     valid screen distance, such as 2 or .5c.  It
                     defaults to 0.

              -ipady amount
                     The   amount  specifies  how  much  vertical
                     internal padding to leave on on the top  and
                     bottom of the slave(s).  This space is added
                     inside  the  slave(s)  border.   The  amount
                     defaults to 0.
              -padx amount
                     The  amount  specifies  how  much horizontal
                     external padding to leave on  each  side  of
                     the  slave(s),  in screen units.  The amount
                     defaults to 0.  This space is added  outside
                     the slave(s) border.

              -pady amount
                     The   amount  specifies  how  much  vertical
                     external padding to leave  on  the  top  and
                     bottom  of  the  slave(s),  in screen units.
                     The amount defaults to  0.   This  space  is
                     added outside the slave(s) border.

              -row n Insert the slave so that it occupies the nth
                     row in the grid.  Row numbers start with  0.
                     If  this  option  is  not supplied, then the
                     slave is arranged on the  same  row  as  the
                     previous  slave  specified  on  this call to
                     grid, or the first unoccupied row if this is
                     the first slave.

              -rowspan n
                     Insert  the slave so that it occupies n rows
                     in the grid.  The default is  one  row.   If
                     the  next grid command contains ^ characters
                     instead of slaves  that  line  up  with  the
                     columns  of  this slave, then the rowspan of
                     this slave is extended by one.

              -sticky style
                     If  a  slave's  cell  is  larger  than   its
                     requested  dimensions,  this  option  may be
                     used to  position  (or  stretch)  the  slave
                     within  its  cell.   Style  is a string that
                     contains zero or more of the  characters  n,
                     s,  e  or w.  The string can optionally con-
                     tains  spaces  or  commas,  but   they   are
                     ignored.   Each  letter  refers  to  a  side
                     (north, south, east, or west) that the slave
                     will  "stick" to.  If both n and s (or e and
                     w)  are  specified,  the   slave   will   be
                     stretched  to  fill  the  entire  height (or
                     width) of its  cavity.   The  sticky  option
                     subsumes  the  combination  of  -anchor  and
                     -fill that is used by pack.  The default  is
                     {}, which causes the slave to be centered in
                     its cavity, at its requested size.

              If any of the slaves are  already  managed  by  the
              geometry  manager  then any unspecified options for
              them  retain  their  previous  values  rather  than
              receiving default values.
       grid forget slave ?slave ...?
              Removes each of the slaves from grid for its master
              and unmaps  their  windows.   The  slaves  will  no
              longer  be  managed  by  the grid geometry manager.
              The configuration options for that window are  for-
              gotten,  so  that if the slave is managed once more
              by the grid geometry manager, the  initial  default
              settings are used.

       grid info slave
              Returns  a list whose elements are the current con-
              figuration state of the slave given by slave in the
              same  option-value  form that might be specified to
              grid configure.  The first two elements of the list
              are ``-in master'' where master is the slave's mas-
              ter.

       grid location master x y
              Given  x and y values in screen units  relative  to
              the  master  window,  the  column and row number at
              that x and y location is returned.   For  locations
              that  are  above  or to the left of the grid, -1 is
              returned.

       grid propagate master ?boolean?
              If boolean has a true boolean value such as 1 or on
              then  propagation is enabled for master, which must
              be a  window  name  (see  ``GEOMETRY  PROPAGATION''
              below).   If boolean has a false boolean value then
              propagation is disabled for master.  In  either  of
              these  cases  an  empty  string  is  returned.   If
              boolean is omitted then the command returns 0 or  1
              to   indicate   whether  propagation  is  currently
              e  name  (se           be  permitted  for this column.  The -weight option
              (an integer value) sets  the  relative  weight  for
              apportioning  any  extra  spaces  among columns.  A
              weight of zero (0) indicates the