The DockLayoutPanel should take up the entire browser window when added to the RootLayoutPanel, regardless of its contents or the setSize 100% call. Did you make sure that your html document has <! DOCTYPE html> at the top to put it into standards mode? I don't offhand see anything problematic in this code, although given that you are using a layout panel, why not also use it for your actual layout at the next level down instead of horizontal/vertical panels?
On Jun 1, 11:04 am, Magnus <[email protected]> wrote: > Hi, > > my WebApp has an outer DockLayoutPanel, where the borders build the > edges of the screen. Within its center, I have a VerticalPanel. The > vertical one contains a MenuBar at the top, a statusbar at the bottom, > and a HorizontalPanel in the middle. The HorizontalPanel is the "main" > or "client" panel, i. e. the panel that contains the actual things the > user should work with, e. g. different forms. > > With this nested layout the "client" portion is always centered within > the browsers window. I use SimplePanel for the different "client" gui > objects, and it works fine. For example, if I want to show a login > form, I put it in a SimplePanel and add it to my client (the > horizontal panel mentioned above). > > However, there are reasons for me to use DockLayoutPanel as the > container for my client gui things. When I do this, the panel is > always so small that you can just see its borders. Even if I put > TextBoxes and Labels in it, it does not get bigger. While the > SimplePanel seems always to be "as big as needed", the DockLayoutPanel > ist always at the smallest dimensions. > > Can I tell the DockLayoutPanel to get pumped up until its big enough > for its contents? > Could it be that the outer panels force it to be that small? > > Help would be great! > > I post my layout method below... > > Thanks > Magnus > > ----- > > private boolean createPanel () > { > ////////////////// > // pnl > > pnl.setSize ("100%","100%"); > pnl.addNorth (new SimplePanel (),mtr_Border); > pnl.addSouth (new SimplePanel (),mtr_Border); > pnl.addWest (new SimplePanel (),mtr_Border); > pnl.addEast (new SimplePanel (),mtr_Border); > > ////////////////// > // vp > > VerticalPanel vp = new VerticalPanel (); > vp.setSize ("100%","100%"); > vp.setVerticalAlignment(ALIGN_MIDDLE); > > SimplePanel stb = new SimplePanel (); // status bar > > HorizontalPanel hp = new HorizontalPanel (); > hp.setHorizontalAlignment(ALIGN_CENTER); > > vp.add(mnb); // menu bar > vp.add(hp); > vp.add(stb); // status bar > > vp.setCellHorizontalAlignment(hp,ALIGN_CENTER); > vp.setCellHeight(stb,"10px"); > vp.setCellHeight(hp,"100%"); > > pnl.add(vp); > > pnl_Center = hp; > > ////////////////// > // root > > RootLayoutPanel root = RootLayoutPanel.get(); > root.add (pnl); > > return (true); > } -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
