User Interface‎ > ‎

Stack Panel

The StackPanel is a table-based widget that gives you an Outlook Bar type area. It gives you a list of headers, each of which has content of some sort, but only one is open at any one time. It is very similar to having a whole bunch of Disclosure panels except that you can only have one open at any point in time.

Reference:
To try the demo, Click on the panelsn named 'One', 'Two', 'Three'.

 
 

Example Code:
function doGet() {
  var app = UiApp.createApplication();

//Create stack panel
  var stackPanel = app.createStackPanel().setSize('100%', '100%');

//add widgets to each stack panel, and name the stack panel
//Here I have used labels as widgets.
  stackPanel.add(app.createLabel('Lorem ipsum dolor sit amet...'), 'One');
  stackPanel.add(app.createLabel('Sed egestas, arcu nec accumsan...'), 'Two');
  stackPanel.add(app.createLabel('Proin tristique, elit at blandit...'), 'Three');

//Add the panel to the application
  app.add(stackPanel);
  return app;
}
Comments