Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT popup setGlassEnabled(true) don't work

Tags:

popup

gwt

I'm creating a popup panel whit same text, i would like to disable the background and make it grey. I read about setGlassEnabled but it doesn't work, can someone help? ps. the popup is correctly visualized.

PopupPanel popup = new PopupPanel(infoType);
popup.center();
popup.setGlassEnabled(true);
popup.show();
like image 656
Matteo Avatar asked Jul 16 '11 16:07

Matteo


1 Answers

The glass panel has no default style, so it's transparent by default. If you want the background to be grayed out, you need to add some CSS styling to the glass panel.

Also, setGlassEnabled only enables the glass panel for the next time the popup is shown, and in your case, the popup is already showing when you call show (because of the previous call to center), so it's a no-op and the glass panel actually isn't used. Move your call to center to after the call to setGlassEnabled and/or call hide before setGlassEnabled.

like image 78
Thomas Broyer Avatar answered Sep 20 '22 15:09

Thomas Broyer