Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>GWT *LayoutPanels do not automatically work when nested in *Panels (the ones without Layout). Thats because of different approaches of layouting:</p> <ul> <li>Layout Panels use absolute CSS layouting where the size must be given by the parent element</li> <li>"Normal" Panels grow with their content</li> </ul> <p>To nest LayoutPanels in Panels, you have to set fixed sizes and call onResize whenever the size cahnges. But alternatively, you can try to only work with LayoutPanels. If I'm right you want to have a header with a dynamic height (the height is defined by it's content). In that case you should Use HeaderPanel. For the Header you can use a VerticalPanel. As container for your (exchangable) content you can use a SimpleLayoutPanel which is a LayoutPanel that hosts one widget:</p> <pre><code>&lt;g:HeaderPanel&gt; &lt;g:VerticalPanel ui:field="headerPane"&gt;&lt;/g:VerticalPanel&gt; &lt;g:SimpleLayoutPanel ui:field="contentPane"&gt;&lt;/g:SimpleLayoutPanel&gt; &lt;/g:HeaderPanel&gt; </code></pre> <p>And from my point of view the extra HTMLPanel around the DockLayoutPanel of the content should be removed to ensure that the size is correctly set from the outside:</p> <pre><code>&lt;g:DockLayoutPanel unit='EM'&gt; &lt;g:north size='4'&gt; &lt;g:Label&gt; Hello &lt;/g:Label&gt; &lt;/g:north&gt; &lt;g:east size="7.0"&gt; &lt;g:HTMLPanel ui:field="EdgeBandingPane"&gt;&lt;/g:HTMLPanel&gt; &lt;/g:east&gt; &lt;g:west size="5.8" &gt; &lt;g:HTMLPanel ui:field="PartsPane"&gt;&lt;/g:HTMLPanel&gt; &lt;/g:west&gt; &lt;g:center &gt; &lt;g:HTMLPanel ui:field="PanelsPane"&gt;&lt;/g:HTMLPanel&gt; &lt;/g:center&gt; &lt;g:south size="5"&gt; &lt;g:Label&gt; Hello &lt;/g:Label&gt; &lt;/g:south&gt; &lt;/g:DockLayoutPanel&gt; </code></pre> <p>Edit: HTMLPanel should only be necessary for "manual" layouting. Do not use it to only wrap one other widget/panel.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload