Class FocusPanel


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

A simple panel that makes its contents focusable, and adds the ability to catch mouse and keyboard events.

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.

Here is an example of how to use this widget:


 function doGet() {
   var app = UiApp.createApplication();
   var focus = app.createFocusPanel();
   var flow = app.createFlowPanel();
   flow.add(app.createButton("button 1"));
   flow.add(app.createButton("button 2"));
   return app;

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 FocusPanel documentation here.

Deprecated methods


Apps Script
Apps Script