0

I have an gwt-ext window (used as a popup), this popup is launched from a GWT application. I´m searching for a solution to set the window-size of the popup to a size, that it nearly fills the screen, not maximize, but to fill the area of an underlying part of the GWT application that launched this popup. Does anybody know a solution for that problem?

Tobias
  • 7,238
  • 10
  • 46
  • 77

2 Answers2

3

Try something like this:

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);
Chris Boesing
  • 5,239
  • 3
  • 26
  • 30
1

This will size to the screen size (not the current browser size)

yourExtGwtWindow.setHeight(screenHeight());
yourExtGwtWindow.setWidth(screenWidth());

...

public static native int screenWidth() 
/*-{ 
      return screen.availWidth; 
}-*/; 

public static native int screenHeight() 
/*-{ 
      return screen.availHeight;
}-*/; 
Craigo
  • 3,384
  • 30
  • 22