monica
monica

Reputation: 31

How can I maximize the root panel size in GWT?

How can I maximize the root panel size in GWT?

Upvotes: 2

Views: 3586

Answers (3)

Lachlan Roche
Lachlan Roche

Reputation: 25946

For a full-window app, get your container with RootPanel.get() or RootLayoutPanel.get() in the EntryPoint's onModuleLoad(). Both will be attached to the document body as an absolutely positioned widget.

From the Mail sample:

public void onModuleLoad()
{
    DockLayoutPanel outer = binder.createAndBindUi(this);

    // Get rid of scrollbars, and clear out the window's built-in margin,
    // because we want to take advantage of the entire client area.
    Window.enableScrolling(false);
    Window.setMargin("0px");

    RootLayoutPanel root = RootLayoutPanel.get();
    root.add(outer);
}

Upvotes: 2

Travis Webb
Travis Webb

Reputation: 15018

Non-issue; the root panel is an absolute panel, and covers the entire browser real-estate

Upvotes: 1

Ankit
Ankit

Reputation: 2753

Create a div in your Project.html file with required dimensions. Than in your onModuoleLoad() method where you are using RootPanel use RootPanel.get('divID') i.e. (div created in html file). And thus you can have root panel of specified size.

Upvotes: 1

Related Questions