1
votes

I'm trying to render a StackLayout inside a DockLayout.

However, all I see is "able" in the west panel. (the first label in the first stack). I don't even see the stack header, or ANYTHING else.

Any ideas as to why this may be? The other panels render OK.

I read LayoutPanels should only be contained in other LayoutPanels, but this IS the case.

My code:

 <g:DockLayoutPanel unit="EM">
  <g:north size="4">
   <g:HTMLPanel>
    <g:HTML>Title</g:HTML>
   </g:HTMLPanel>
  </g:north>

  <g:west size="6">
   <g:StackLayoutPanel>
    <g:stack>
     <g:header size='3'>
      <b>HTML</b>
      header
     </g:header>
     <g:Label>able</g:Label>
    </g:stack>
    <g:stack>
     <g:customHeader size='3'>
      <g:Label>Custom header</g:Label>
     </g:customHeader>
     <g:Label>baker</g:Label>
    </g:stack>
   </g:StackLayoutPanel>
  </g:west>

  <g:center>

   <g:HTML>main content</g:HTML>

  </g:center>
 </g:DockLayoutPanel>

1

1 Answers

4
votes

After a pretty long and annoying afternoon, I've found out what the problem was.
I hope this helps someone some day.

You need to specify the unit property for the StackLayoutPanel.

I first tried PX, and thought it didn't work... The issue was that it was actually too small to be seen. EM worked fine:

    <g:StackLayoutPanel unit='EM'>