Note that there are some explanatory texts on larger screens.

plurals
  1. POGWT StackLayoutPanel: dynamic and automatic height
    text
    copied!<p>I'm using a StackLayoutPanel to show stacked emails of a conversation a la gmail where the header is the sender and the child the email's body. For the dynamic nature of this, I can only estimate the height of my stack in code. To estimate the body's height I could get the client's window's width then roughly guess how many lines the body occupies. But this is laborious and likely to be wrong.</p> <p>My question is: is there a way for the StackLayoutPanel, as for GWT API 2.2, to know and so set automatically the height in display of the current shown child (plus its header and the other headers)?</p> <p>I'm afraid not so I've tried other things that also, however, fail. I've tried:</p> <ol> <li><p>Put the StackLayoutPanel inside a ScrollPanel:</p> <ul> <li>If I don't set in code a stack's size, mysteriously I can only see the first stack's header and nothing more, not its body, nor other headers.</li> <li>If I do set it, then I have the problem of the body's height estimation.</li> </ul></li> <li><p>Not inside a ScrollPanel: the stack gets automatically the size of remaining window's space, but with too many headers these overlap and superimpose each other.</p></li> </ol> <p>Also, it seems the default behaviour for StackLayoutPanel is to show the rest of headers at the very end of the allocated space, not just after the before's header's child. Is it possible to change this?</p> <p>Help on this would be much appreciated.</p> <p>//I know a similar question is <a href="https://stackoverflow.com/questions/4334216/stacklayoutpanel-has-no-more-place-to-show-the-children-when-there-are-too-many-h">this</a> but I think I expand on it.</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