Gwt layout panels to match browser screen size not working

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

trying just to get app layout to fit whole browser screen, only works in IE. I have a DockLayoutPanel and a HorizontalPanel added to the Dock center:

             DockLayoutPanel layout = new DockLayoutPanel(Unit.EM);
             HorizontalPanel hp = new HorizontalPanel();
             layout.add(hp);
             RootLayoutPanel rp = RootLayoutPanel.get();
             rp.add(layout);

On chrome and firefox the displayed screen is "too big", only see part of it. In GWT development mode, it works fine in all browsers.I ve tried setting Dock and Horizontal panel sizes explicitly, based on Window.getClientWidth/Height, but it has no effect. I thought that just making a DockLayoutPanel and adding it to a RootLayoutPanel guarantees matching to the browser client screen area...

Answers

http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#Standards http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html#Standards Why don t you use LayoutPanels inside your DockLayoutPanel?

Or alternatively use a FlowPanel with float:left like explained in the docs.

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/9434938/gwt-layout-panels-to-match-browser-screen-size-not-working

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils