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.
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)?
I'm afraid not so I've tried other things that also, however, fail. I've tried:
Put the StackLayoutPanel inside a ScrollPanel:
- 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.
- If I do set it, then I have the problem of the body's height estimation.
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.
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?
Help on this would be much appreciated.
//I know a similar question is this but I think I expand on it.