<section ID="chapter.widgets.placeholder">
  <TITLE>Placeholder widget</TITLE>

<subsection> <TITLE>Description</TITLE>

<P>
Using <<td>>, <<lr>> and all the other widgets, applications statically define their geometry and the widget of a window. Most of the time, an application need widgets that evolve dynamically which is done easily by QTk. However some applications may need to dynamically change the widgets that are displayed, or the way (their geometry) they are displayed. This is the gap that <<placeholder>> fills.
</P>
<P>
A placeholder is a rectangular area where a widget can be put. This widget can be changed at any time of execution. If a placeholder is specified a look, this look is <EM>not</EM> propagated to the widgets displayed inside the placeholder.
</P>

<subsection> <TITLE>Parameters</TITLE>

<P>
<LIST>

<ITEM> <<1:R>> : Specifies the widget to display in the placeholder. <<R>> must be a valid one of the following :

<LIST>
<ITEM> The atom <<empty>> to leave the placeholder blank.
<ITEM> A record describing a widget. 
<ITEM> An handle to a widget that has already been displayed inside this particular placeholder. A placeholder can display several widgets and switch between them without having to rebuild them and setting them in the correct state each time.
</LIST>

&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> <<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_font;
&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>
