Question

J'ai une fenêtre GWT-poste (utilisé comme popup), ce pop-up est lancé à partir d'une application GWT. Je suis la recherche d'une solution pour régler la fenêtre taille de la fenêtre à une taille, qu'il remplit presque l'écran, ne maximisera pas, mais pour remplir la zone d'une partie sous-jacente de l'application GWT qui a lancé cette fenêtre. Quelqu'un sait-il une solution à ce problème?

Était-ce utile?

La solution

Essayez quelque chose comme ceci:

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

Autres conseils

Cette taille de volonté de la taille de l'écran (pas la taille actuelle du navigateur)

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

...

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

public static native int screenHeight() 
/*-{ 
      return screen.availHeight;
}-*/; 
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top