Class PopupPanel


Deprecated. The UI service was deprecated on December 11, 2014. To create user interfaces, use the HTML service instead.

A panel that can "pop up" over other widgets. It overlays the browser's client area (and any previously-created popups).

In general it's not recommended to add this panel as a child of another widget or of the app as that will make it behave like any other inline panel and not act as a popup. Instead, create the popup and then use its show() and hide() methods to show and hide it. See the example below.

To make the popup stay at a fixed location rather than scrolling with the page, try setting the 'position', 'fixed' style on it with setStyleAttribute(attribute, value).

Note that this panel can contain at most one direct child widget. To add more children, make the child of this panel a different panel that can contain more than one child.

Internally, UiApp widgets are built on top of the Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation directly. You can find the PopupPanel documentation here.

Here is an example showing how to use the popup panel widget:

 function doGet() {
   var app = UiApp.createApplication();
   // Create a popup panel and set it to be modal.
   var popupPanel = app.createPopupPanel(false, true);
   // Add a button to the panel and set the dimensions and position.
       .setPopupPosition(100, 100);
   // Show the panel. Note that it does not have to be "added" to the UiInstance.;
   return app;

Deprecated methods


Apps Script
Apps Script