[英]How can I maximize the root panel size in GWT?
如何在GWT中最大化根面板的大小?
For a full-window app, get your container with RootPanel.get() or RootLayoutPanel.get() in the EntryPoint's onModuleLoad()
. 对于全窗口应用程序,请在EntryPoint的
onModuleLoad()
中使用RootPanel.get()或RootLayoutPanel.get()获取容器。 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);
}
Create a div in your Project.html file with required dimensions. 在Project.html文件中创建具有所需尺寸的div。 Than in your onModuoleLoad() method where you are using RootPanel use RootPanel.get('divID') ie (div created in html file).
在使用RootPanel的onModuoleLoad()方法中,使用RootPanel.get('divID')即(在html文件中创建的div)。 And thus you can have root panel of specified size.
因此,您可以具有指定大小的根面板。
Non-issue; 没问题; the root panel is an absolute panel, and covers the entire browser real-estate
根面板是一个绝对面板,涵盖了整个浏览器的房地产
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.