gwt-extウィンドウ(ポップアップとして使用)があります。このポップアップはGWTアプリケーションから起動されます。ポップアップのウィンドウサイズを、最大化するのではなく、画面全体にほぼ表示されるサイズに設定するソリューションを探していますが、このポップアップを起動したGWTアプリケーションの基になる部分の領域を塗りつぶします。誰かがその問題の解決策を知っていますか?
4323 次
2 に答える
3
次のようなことを試してください:
int windowHeight=Window.getClientHeight()-10; //I subtract 10 from the client height so the window isn't maximized.
int windowWidth=Window.getClientWidth()-10; //I subtract 10 from the client width so the window isn't maximized.
yourExtGwtWindow.setHeight(windowHeight);
yourExtGwtWindow.setWidth(windowWidth);
于 2011-01-04T12:12:48.627 に答える
1
これは(現在のブラウザサイズではなく)画面サイズに合わせてサイズ変更されます
yourExtGwtWindow.setHeight(screenHeight());
yourExtGwtWindow.setWidth(screenWidth());
..。
public static native int screenWidth()
/*-{
return screen.availWidth;
}-*/;
public static native int screenHeight()
/*-{
return screen.availHeight;
}-*/;
于 2012-08-22T05:33:33.623 に答える