2011-06-30 12 views
1

ページ上の特定の場所にウィンドウポップアップを作成するにはどうすればよいですか?キャンバスの根底にあるsetRect()メソッドの使用)スマートgwtウィンドウの位置

答えて

1

を私はこれを行うための簡単な方法が表示されていないので、私はいつも(window.centerInPageを使用しています:Canvas.setRect(int left, int top, int width, int height)

window.setRect(250, 100, 500 500); 

を必要に応じて再描画することを忘れないでください。

GWTウィンドウを使用している場合は、hereと指定してWindow.open(String url, String target, String features)メソッドを使用してください。

Window.open(URL, "newWindow", "left=250,top=100,width=500,height=500"); 
1

ない、これが最善の方法ですが、動作するかどうかを確認します。

int browserInnerWidth = com.google.gwt.user.client.Window.getClientWidth(); 
myWindow.show(); 
myWindow.setLeft(browserInnerWidth - windowWidth); 
関連する問題