
BOXES AND FORMS
     Several objects are provided to manage the appearance of the
     panel. These include box and  form objects. Box objects han-
     dle the layout of the objects within them; the  form  object
     requires  the  user  to specify the position of each object,
     either relative to the upper-left corner  of  the  form,  or
     relative  to another object in the form.  Whether you should
     use a box or a form depends on how much control you need  to
     have over the panel layout.

     Box objects group other objects into boxes that are oriented
     either  vertically or horizontally. In a vertically oriented
     box, the objects are arranged in a single column, and then a
     box  is drawn around them. If space is available next to one
     object (because an earlier object is very wide) then the new
     object will be placed on the same row rather than starting a
     new one.

     A vertically oriented box (vbox) is specified as follows:

     vbox={ name=
     objecttype={ parameter=value ... }
     objecttype={ parameter=value ... }
     }

     All of the objects bounded by the starting and ending braces
     of a box will be grouped together in the box. In addition to
     vbox, there is hbox, which  is  oriented  horizontally,  and
     vpane  and  hpane,  where  the  objects  within  the box are
     separated by movable partitions (these use the Athena  paned
     widget).  There  is also box and pane; these default to vbox
     and vpane, but could be overridden from a resource file.

     Boxes can be nested. In this  way,  fairly  precise  control
     over a panel's layout can be obtained.

     Box objects can have a name.  Two special names  are  recog-
     nized  by  the  resource file; boxes with name=noborder will
     have no border drawn around them. If you  use  boxes  exten-
     sively  to  arrange objects on the panel, using noborder can
     help avoid the tunnel-like  appearance  of  multiple  nested
     boxes.  Also, one of the examples makes use of a special box
     name squeezebox.  This  name  triggers  definitions  in  the
     resource  file that "squeeze out" the annotation of sliders,
     choices, and buttons that are grouped  together  in  such  a
     box.  Boxes may also use most of the parameters described in
     MISCELLANEOUS PARAMETERS, such as height, width, and color.

     Form objects group other objects into  a  rectangular  area.
     The  position  of each object within the area must be speci-
     fied by the user in the script file. There are two  ways  to
     do  this.  The parameters x and y can be used to specify the
     location of the object's upper left corner, with respect  to
     the upper left corner of the form. Alternatively, the param-
     eters "fromHoriz" and "fromVert" can be  used  to  indicated
     that  an  object  is  to  be  placed  relative to some other
     object. If fromHoriz or fromVert is used, then x  or  y  may
     also be specified to give the distance separating the object
     from  the  other  object  to  which  it  is  connected.   If
     fromHoriz  or  fromVert are used alone, a minimum separation
     of 4 pixels will be maintained between objects.


     It is important to note that when you use a form, the  posi-
     tion  MUST  be  specified  for  ALL objects contained in the
     form. Otherwise,  objects  may  be  placed  on  top  of  one
     another, and some may be invisible.

     The form object provides a greater degree  of  control  over
     the  panel  layout.  However, because it does not do default
     positioning in a reasonable way as the box objects  do,  the
     form  object  may yield unexpected results if not used care-
     fully. You should avoid the form object  unless  the  layout
     obtainable with boxes is not sufficiently accurate. There is
     an example of a script using a form in the  xtpanel-examples
     example  demo.  Under  the  script examples, see the example
     named "form".

     If a form contains a box, coordinates must be specified  for
     the  box  itself,  but are not needed for objects within the
     box, as the box object manages the layout within itself.

     The top-level xtpanel object is by  default  a  box,  within
     which the user-specified objects are contained. By beginning
     a script file with "form={", the user can  effectively  make
     the top-level object a form instead.

     Both boxes and forms  are  only  available  through  xtpanel
     scripts.   They  are  not  available  from the command line.
     Boxes are supported in the xtpanel generator, but not forms.
