Andrey Agibalov
Andrey Agibalov

Reputation: 7694

GWT DockLayoutPanel implicit sizing for non-center items?

I have layout defined like this:

<g:DockLayoutPanel unit="PX">
    <g:north size="100">
        <g:Label>top</g:Label>
    </g:north>
    <g:center>
        <g:ScrollPanel>
            <g:VerticalPanel>
                <g:Label>center</g:Label>
                <g:Label>center</g:Label>
                <g:Label>center</g:Label>
                <g:Label>center</g:Label>
                <g:Label>center</g:Label>
                <g:Label>center</g:Label>
                <g:Label>center</g:Label>
                <g:Label>center</g:Label>
                <g:Label>center</g:Label>
            </g:VerticalPanel>
        </g:ScrollPanel>
    </g:center>
    <g:south size="100">
        <g:Label>bottom</g:Label>
    </g:south>  
</g:DockLayoutPanel>

The idea is to get the whole page divided into 3 parts: both fixed-size top and bottom and rubber center. That works absolutely fine but I don't like the way both north and south parts are defined - their heights are hardcoded (both are 100px).

Is it possible to get the same result without hardcoding heights?

Upvotes: 0

Views: 533

Answers (1)

Thomas Broyer
Thomas Broyer

Reputation: 64561

Yes, use a HeaderPanel instead.

Upvotes: 3

Related Questions