Question about GWT and docpanels, calibration and resizing

question about dock panels in gwt

So, I want the docpanel to occupy the entire size of the browser window.

        dockPanel.setSize("100%", "100%");

if it is right

The next question, I'm going to add a north panel, which will be 100 pixels high and occupy the entire width of the browser.

    topPanel.setSize("100%", "100px");
    dockPanel.add(topPanel, DockPanel.NORTH);

this is correct, then I want to add a western panel with a width of 200 pixels and the entire browser length up to the northern panel westSideStackPanel.setSize ("200px", "100%") mainPanel.add (westSideStackPanel, DockPanel.WEST);

I created all of this, but when I look at my dock, there is a large gap between the western panel and the northern panel across the screen. why would that be?

The north panel remains at 100 pixels, and then there is a width of about 100 pixels across the entire width of the screen.

alt text

+3
3

RootLayoutPanel ( ), DockLayoutPanel (v DockPanel). .

public void onModuleLoad() {
    RootLayoutPanel rp = RootLayoutPanel.get();
    DockLayoutPanel dp = new DockLayoutPanel(Unit.PX);
    rp.add(dp);
    ...
}
+3

- DockLayoutPanel, : LayoutPanel. LayoutPanel , DockLayoutPanel, . , LayoutPanel.

0

dockPanel.setCellHeight(topPanel, "100px");
dockPanel.setCellHeight(westSideStackPanel, "100%");

DockPanel, , , - .

, , Firebug, , !

0

Source: https://habr.com/ru/post/1748926/


All Articles