<section ID="chapter.widgets.tdlr">
  <TITLE>Td and lr widgets</TITLE>


<subsection> <TITLE>Description</TITLE>

<P>
<<td>> and <<lr>> are frames, that is rectangular area. Their primary purpose is to act as a spacer or container for complex window layouts. The only features of a frame are its background color and an optional 3-D border to make the frame appear raised or sunken. <<td>> places the widgets top-down, while <<lr>> places them left to right. <<newline>> allows widgets to be placed on a grid structure. <<continue>> makes widgets span several rows or columns. See <ptr to="basics.geometry"> for further details.
</P>

<subsection> <TITLE>Parameters</TITLE>

<P>
<LIST>
<ITEM> <<n:...>> : With <<n>> starting at <<1>> and going up one by one. Can take four different forms :

<LIST>

<ITEM> <<n:R>> : Specifies a widget to place inside the frame. <<R>> must be a record describing a widget.

<ITEM> <<n:newline>> : For <<td>> (resp. <<lr>>), jumps to the next line (resp. column) so that all widgets placed on several lines (resp. columns) are vertically (resp. horizontally) aligned.

<ITEM> <<n:continue>> : Spans the previous widget (if any) one more line or column. Normally, all widgets share the available space equally : two labels glued <<nswe>> in a single frame will have the same width and height. By continuing a widget, you can force it to act as if he was taking the space of two or more widgets. For example, continuing the first label will make him take 2/3 of the width (or height), leaving the rest for the second label.

<ITEM> <<n:empty>> : Leaves an empty blank space.
</LIST>
Note that <<newline>>, <<continue>> and <<empty>> are <EM>not</EM> widgets and therefore can't be glued and don't have an handle. These parameters can be specified at creation time only. If you need windows that change their widgets dynamically, use the <<placeholder>> widget (see <ptr to="chapter.widgets.placeholder">).

&param_borderwidth;
&param_cursor;
&param_highlightbackground;
&param_highlightcolor;
&param_highlightthickness;
&param_relief;
&param_takefocus;
&param_background;

<ITEM> <<class:VS>> : Specifies a class for the window. This class will be used when querying the option database for the window's other options, and it will also be used later for other purposes such as bindings. This option can be specified at creation time only. <<VS>> must be a virtual string.

<ITEM> <<colormap:V>> : Specifies a colormap to use for the window. The value may be either the atom <<new>>, in which case a new colormap is created for the window and its children, or the handle of another window (which must be on the same screen and have the same visual as this widget), in which case the new window will use the colormap from the specified window. If the colormap option is not specified, the new window uses the same colormap as its parent. This option can be specified at creation time only.

<ITEM> <<container:B>> : Specifies if this window will be used as a container in which some other application will be embedded or not. The window will support the appropriate window manager protocols forthings like geometry requests. The window should not have any children of its own in this application. This option can be specified at creation time only.

<ITEM> <<width:P>> : Specifies the desired width for the window. If this option is less than or equal to zero then the window will not request any size at all. <<P>> must be a valid screen distance (see <ptr to="misc.distance">).

<ITEM> <<height:P>> : Specifies the desired height for the window. If this option is less than or equal to zero then the window will not request any size at all. <<P>> must be a valid screen distance (see <ptr to="misc.distance">).

<ITEM> <<visual:A>> : Specifies visual information for the new window. <<A>> must be one of the following atoms : <<directcolor>>, <<grayscale>>, <<greyscale>>, <<pseudocolor>>, <<staticcolor>>, <<staticgray>>, <<staticgrey>>, or <<truecolor>>. If this option is not specified, the new window will use the same visual as its parent. This option can be specified at creation time only.

&param_glue;
&param_padx;
&param_pady;
&param_feature;
&param_handle;
&param_tooltips;


</LIST>

</P>

<subsection> <TITLE>Interface</TITLE>

<P>
The object you get by an handle on the widget implements the following methods :

<LIST>

&interface_set;
&interface_get;
&interface_bind;
&interface_getFocus;
&interface_setGrab;
&interface_releaseGrab;
&interface_getGrabStatus;
&interface_raise;
&interface_lower;
&interface_winfo;

</LIST>


</section>
