簡體   English   中英

如何在GWT中最大化根面板的大小?

[英]How can I maximize the root panel size in GWT?

如何在GWT中最大化根面板的大小?

對於全窗口應用程序,請在EntryPoint的onModuleLoad()中使用RootPanel.get()RootLayoutPanel.get()獲取容器。 兩者都將作為絕對定位的小部件附加到文檔主體。

從郵件示例:

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);
}

在Project.html文件中創建具有所需尺寸的div。 在使用RootPanel的onModuoleLoad()方法中,使用RootPanel.get('divID')即(在html文件中創建的div)。 因此,您可以具有指定大小的根面板。

沒問題; 根面板是一個絕對面板,涵蓋了整個瀏覽器的房地產

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM