3

I describe my panel in next way

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
         xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<g:DockLayoutPanel unit="PX" width="600" >
    <g:north size="85">
    ....
    </g:north>
    <g:center>
    ....

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

GWT generated for north and center next divs.

 <div style="position: absolute; overflow: hidden; left: 0px; top: 0px; right: 0px; height: 85px;"
 <div style="position: absolute; overflow: hidden; left: 0px; top: 85px; right: 0px; bottom: 0px;">

They contains data that what I need, but second div doesn't displayed. Where I am wrong?

UPD: Just for example, for

    <g:center>
        <g:FlowPanel height="100%">
            <g:Label height="100%">TEST2</g:Label>
        </g:FlowPanel>
    </g:center>

I get

<div style="position: absolute; overflow: hidden; left: 0px; top: 85px; right: 0px; bottom: 0px;">
<div style="position: absolute; overflow: hidden; left: 0px; top: 85px; right: 0px; bottom: 0px;">
    <div style="height: 100%; position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;">
        <div class="gwt-Label" style="height: 100%;">TEST2</div>
    </div>
</div>
</div>
Stan Kurilin
  • 15,614
  • 21
  • 81
  • 132

3 Answers3

9

I think I know what you did wrong. You need this:

RootLayoutPanel().get().add(new MyView());

instead of:

RootPanel().get().add(new MyView());

Because if you use uibinder you need the RootLayouPanel!

I hope it will help you!

Stan Kurilin
  • 15,614
  • 21
  • 81
  • 132
ngspkinga
  • 421
  • 5
  • 16
1

I have fixed this next way:

<ui:style>
    .visible {
        overflow: visible !important;
    }
</ui:style>

<g:DockLayoutPanel unit="PX" width="100%" height="100%">
    <g:north size="46" styleName="{style.visible}">
         ...
    </g:north>
</g:DockLayoutPanel>
Oleg Novosad
  • 2,261
  • 1
  • 27
  • 28
  • Thanks, it works with small modifications: - set style selector to ".visible > div" (div child of element with visible class is north element) - add styleName (or better addStyleNames) to DockLayoutPanel – gingo Dec 29 '14 at 00:28
0

Edit: The important thing is, what is in the center widget. Example FlowPanel will fill out the area, but VerticalPanel not. Then you have to set the height property 100%.

ngspkinga
  • 421
  • 5
  • 16