DockLayoutPanel messed up with UiBinder

145 views
Skip to first unread message

Simon

unread,
Jun 13, 2010, 11:59:33 AM6/13/10
to Google Web Toolkit
My simple DockLayoutPanel test is all messed up: the south element
appears at the top of the page, the west and center elements don't
appear ...


<!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='EM'>
<g:north size='5'>
<g:Label>Top</g:Label>
</g:north>
<g:south size='2'>
<g:HTML>south</g:HTML>
</g:south>
<g:west size='10'>
<g:HTML>
west
</g:HTML>
</g:west>
<g:center>
<g:Label>Body</g:Label>
</g:center>
</g:DockLayoutPanel>
</ui:UiBinder>

And how it is inserted :

@Override
public void onModuleLoad() {
TestUiBinder testUI = new TestUiBinder();
RootPanel.get().add(testUI);
}

I guess I am missing something, but I can't figure what ...

Thomas Broyer

unread,
Jun 13, 2010, 12:17:47 PM6/13/10
to Google Web Toolkit
The part where it says you should use RootLayoutPanel instead of
RootPanel when using layout panels, or give your panel a fixed size
("Using a LayoutPanel without RootLayoutPanel" section):
http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#Recipes

Simon

unread,
Jun 13, 2010, 2:20:51 PM6/13/10
to Google Web Toolkit
Thanks !
> ("Using a LayoutPanel without RootLayoutPanel" section):http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#Re...
Reply all
Reply to author
Forward
0 new messages