A container element for grouping other controls in an absolutely positioned box.<br/> Implements generic <b>boxed object</b> with no specific functionality (see remarks).<p> A dialog or an HTML frame can use <b>boxed objects</b> to arrange the contents using absolute positioning. </p><p> A boxed object is an HTML element that can participate in automatic dialog/frame layout made by <q ref="core.lib:Global!LAYOUT_BOX">LAYOUT_BOX</q> method Having a hierarchy of boxed objects allows to arrange the dialog/frame contents automatically by a single call to 'layout' method (e.g. by invoking <q ref="core.lib:Dialog!layout">layout</q> method). </p><p> Typically, the layout is done during HTML initializaiton or on <code>body</code> resize by calling to <code>layout</code> method of the tompost boxed object. The simplest method to achieve proper size calculation is to use <q ref="core.lib:Dialog">Dialog</q> component, as the topmost element in the page. The Dialog component automatically takes entire document client area, listens on window intialization and resizing events and arranges all elements in the document automatically. If you need to resize some boxed object at later time, use <q ref="core.lib:Global!SET_BOX">SET_BOX</q> (do not setting the <code>box</code> attribute dynamically). </p><p> The following shows a skeleton of a typical HTML page with boxed objects and automatic layout calculation: <pre> &lt;HTML xmlns:STB=&quot;urn:guimachine-com:storyboard&quot;&gt; #USING[lib:Global.js] #USING[lib:Dialog.htc] #USING[lib:Box.htc] ... &lt;BODY&gt; &lt;STB:DIALOG id=&quot;elmDialog&quot;&gt; &lt;STB:BOX box=&quot;0 0 W 100&quot;&gt;...&lt;/STB:BOX&gt; &lt;STB:BOX box=&quot;0 100 W H-100&quot;&gt;...&lt;/STB:BOX&gt; ... &lt;/STB:DIALOG&gt; &lt;/BODY&gt; &lt;/HTML&gt; </pre> </p><p> There are several types of <b>boxed objects</b>: <ul><li>Any simple HTML element. </li><li>Lightweight HTC. </li><li>Heavyweight HTC. </li></ul> </p><p> <u>Note</u>: IFRAME cannot be boxed object. To achieve proper positioning of IFRAME, the hosting dialog/frame must manually adjust IFRAME's position (via standard HTML style attributes). Typically, this is done during host dialog/frame initialization and on each resize. </p><p> In order to allow recursive layout calculation to go over the entire boxed objects hierarchy without stopping at any level, it is important to define each boxed object correctly, depending on boxed object type: </p><p> <b>A simple HTML element.</b> <ul><li>Set element's 'box' attribute (<q ref="core.lib:Global!BOUNDING_BOX">BOUNDING_BOX</q>) to one of the possible correct values </li><li>If the element contains other boxed elements, set element's <code>hasChildBoxes</code> attrubute to <code>true</code> </li></ul> <b>Lighweight HTC, system-defined (all components implemented in <code>core.lib</code> package)</b> <ul><li>Set element's 'box' attribute (<q ref="core.lib:Global!BOUNDING_BOX">BOUNDING_BOX</q>) to one of the possible correct values </li></ul> <b>Lighweight HTC, custom-made</b> <ul><li>Set element's 'box' attribute (<q ref="core.lib:Global!BOUNDING_BOX">BOUNDING_BOX</q>) to one of the possible correct values. </li><li>If your custom HTC can have child elements which are also boxed objects, add the following property to your HTC:<br><font color="green">&lt;PUBLIC:PROPERTY name="hasChildBoxes" value="yes" /&gt;</font></br> </li></ul> <b>Heavyweight HTC, custom-made (see also additional remarks below)</b> <ul><li>Set element's 'box' attribute (<q ref="core.lib:Global!BOUNDING_BOX">BOUNDING_BOX</q>) to one of the possible correct values. </li><li>Implement the following public HTC property (see also <q ref="core.lib:Box!box">box</q>):<br><font color="green">&lt;PUBLIC:PROPERTY name="box" get="getBox" put="setBox" /&gt;</font></br> </li><li>Implement the following public HTC property (see also <q ref="core.lib:Box!box">box</q>):<br><font color="green">&lt;PUBLIC:PROPERTY name="hasOwnLayout" value="yes" /&gt;</font></br> </li><li>Implement the following public HTC method (see <q ref="core.lib:Box!layout">layout</q>): <br><font color="green">&lt;PUBLIC:METHOD name="layout" /&gt;</font></br> </li></ul> </p><p> <u>Additional guidelines regarding heavyweight HTC components</u> </p><p> <ul><li>Heavyweight HTC component has its own HTML markup (specifially, it has &lt;BODY&gt; with some inner HTML). Typically the body should have root <q ref="core.lib:Box">Box</q> component that takes care of the inner layout. </li><li>It is incorrect to put <q ref="core.lib:Dialog">Dialog</q> component as the root element, because there should be only one <q ref="core.lib:Dialog">Dialog</q> in the HTML document, and this root Dialog was already created by the host HTML (see above) </li><li>The custom HTC <code>layout</code> method should first call to a <q ref="core.lib:Global!LAYOUT_BOX">LAYOUT_BOX</q> method to resize the HTC element itself, and then call to a <code>layout</code> method of the root Box element. The second call is necessary because recursive layout calculation inside <code>LAYOUT_BOX</code> doesn't have access to element's children (e.g. to root Box) </li></ul> </p><p> The following shows a skeleton of a typical heavyweight HTC which is a boxed object: <pre> &lt;PUBLIC:COMPONENT tagname=&quot;MYTAG&quot;&gt; &lt;PUBLIC:DEFAULTS viewLinkContent=&quot;true&quot;/&gt; &lt;PUBLIC:PROPERTY name=&quot;box&quot; get=&quot;getBox&quot; put=&quot;setBox&quot;/&gt; &lt;PUBLIC:PROPERTY name=&quot;hasOwnLayout&quot; value=&quot;yes&quot;/&gt; &lt;PUBLIC:METHOD name=&quot;layout&quot;/&gt; &lt;HTML xmlns:stb=&quot;urn:guimachine-com:storyboard&quot;&gt; &lt;HEAD&gt; #USING[lib:Global.js] #USING[lib:Box.htc] &lt;SCRIPT&gt; function getBox() { return GET_BOX(element); } function setBox(val) { SET_BOX(element, val); } function layout() { LAYOUT_BOX(element); elmBox.layout(); } &lt;/SCRIPT&gt; &lt;/HEAD&gt; &lt;BODY&gt; &lt;STB:BOX id=&quot;elmBox&quot; box=&quot;0 0 W H&quot;&gt; &lt;STB:BOX box=&quot;0 0 W 100&quot;&gt;...&lt;/STB:BOX&gt; &lt;STB:BOX box=&quot;0 100 W H-100&quot;&gt;...&lt;/STB:BOX&gt; ... &lt;/STB:BOX&gt; &lt;/BODY&gt; &lt;/HTML&gt; &lt;/PUBLIC:COMPONENT&gt; </pre> </p><p> If one heavyweight HTC is used by another heavyweight HTC, then the automatic layout, invoked by tompost Dialog element during HTML initialization, might not work, because innermost HTC was not yet loaded (heavyweight HTC are loaded asynchronously). In such case, you need to attach the outermost HTC to the <code>ondocumentready</code> event (<code>ondocumentready</code> is fired from bottom to top, so that parent element is only ready when all child elements are ready). </p><p> The following shows typical heavyweight HTC which includes another heavyweight HTC: <pre> &lt;PUBLIC:COMPONENT tagname=&quot;OUTER&quot;&gt; &lt;PUBLIC:ATTACH event=&quot;ondocumentready&quot; onevent=&quot;init()&quot;/&gt; ... function init() { elmInner.layout(); } ... &lt;BODY&gt; &lt;STB:BOX id=&quot;elmBox&quot; box=&quot;0 0 W H&quot;&gt; &lt;STB:INNER box=&quot;0 0 W H&quot;/&gt; ... &lt;/STB:BOX&gt; &lt;/BODY&gt; ... &lt;/PUBLIC:COMPONENT&gt; </pre> </p>(c) SAP AG 2003-2006. All rights reserved. Gets or sets the bounding box of the control. Gets or sets the control styling glyph. Gets or sets whether the box is visible. Hides the box. Lays out the box and all its contained boxes.To efficiently layout a tesselated display use a hierarchy of boxes without any intervening elements, and call this method only on the outermost box. Shows the box. Fires whenever the box is moved/resized.