Andrey Agibalov
Andrey Agibalov

Reputation: 7694

GWT DockLayoutPanel + ScrollPanel inside DecoratorPanel as a center

I have my layout defined like this:

<g:DockLayoutPanel unit="PX">
    <g:north size="100">
        <g:Label>top</g:Label>
    </g:north>
    <g:center>
        <!-- <g:DecoratorPanel> -->
        <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:DecoratorPanel> -->
    </g:center>
    <g:south size="100">
        <g:Label>bottom</g:Label>
    </g:south>  
</g:DockLayoutPanel>

Works fine, but if I wrap ScrollPanel with DecoratorPanel, scroll never works. What is the problem and how should I fix it?

Upvotes: 0

Views: 881

Answers (2)

cardamo
cardamo

Reputation: 853

I tried your example, scroll works) But scrollbar located at right edge of window.

If you dont see it, try to add or set width of scrollPanel.

Upvotes: 0

Strelok
Strelok

Reputation: 51481

DecoratorPanel is rendered as a <table>, so you should not use it as a direct child of <g:center> tag.

What are you trying to do?

Upvotes: 1

Related Questions