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();
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With