Trait

com.google.appsscript.ui

ListBox

Related Doc: package ui

Permalink

trait ListBox extends Object

ListBox Deprecated. The UI service was deprecated on December 11, 2014. To create user interfaces, use the HTML service instead. A widget that presents a list of choices to the user, either as a list box or as a drop-down list. Here is an example usage, which should be executed from within a spreadsheet bound script.

// execute this in a spreadsheet function show() { var doc = SpreadsheetApp.getActiveSpreadsheet(); var app = UiApp.createApplication().setTitle('My Application'); var panel = app.createVerticalPanel(); var lb = app.createListBox(true).setId('myId').setName('myLbName');

// add items to ListBox lb.setVisibleItemCount(3); lb.addItem('first'); lb.addItem('second'); lb.addItem('third'); lb.addItem('fourth'); lb.addItem('fifth'); lb.addItem('sixth');

panel.add(lb); var button = app.createButton('press me'); var handler = app.createServerClickHandler('click').addCallbackElement(panel); button.addClickHandler(handler); panel.add(button); app.add(panel); doc.show(app); }

function click(eventInfo) { var app = UiApp.getActiveApplication(); // get values of ListBox var value = eventInfo.parameter.myLbName; // multi select box returns a comma separated string var n = value.split(',');

var doc = SpreadsheetApp.getActiveSpreadsheet(); doc.getRange('a1').setValue(value); doc.getRange('b1').setValue('there are ' + n.length + ' items selected'); 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 ListBox documentation here.

Annotations
@RawJSType()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ListBox
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addBlurHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  5. def addChangeHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  6. def addClickHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  7. def addFocusHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  8. def addItem(text: String, value: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  9. def addItem(text: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  10. def addKeyDownHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  11. def addKeyPressHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  12. def addKeyUpHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  13. def addMouseDownHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  14. def addMouseMoveHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  15. def addMouseOutHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  16. def addMouseOverHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  17. def addMouseUpHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  18. def addMouseWheelHandler(handler: Handler): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  19. def addStyleDependentName(styleName: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  20. def addStyleName(styleName: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  21. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  22. def clear(): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  23. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  26. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  28. def getId(): String

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  29. def getTag(): String

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  30. def getType(): String

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  31. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  32. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  33. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  34. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  35. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  36. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  39. def removeItem(index: Int): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  40. def setAccessKey(accessKey: Char): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  41. def setEnabled(enabled: Boolean): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  42. def setFocus(focus: Boolean): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  43. def setHeight(height: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  44. def setId(id: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  45. def setItemSelected(index: Int, selected: Boolean): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  46. def setItemText(index: Int, text: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  47. def setLayoutData(layout: AnyRef): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  48. def setName(name: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  49. def setPixelSize(width: Int, height: Int): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  50. def setSelectedIndex(index: Int): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  51. def setSize(width: String, height: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  52. def setStyleAttribute(attribute: String, value: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  53. def setStyleAttributes(attributes: AnyRef): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  54. def setStyleName(styleName: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  55. def setStylePrimaryName(styleName: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  56. def setTabIndex(index: Int): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  57. def setTag(tag: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  58. def setTitle(title: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  59. def setValue(index: Int, value: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  60. def setVisible(visible: Boolean): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  61. def setVisibleItemCount(count: Int): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  62. def setWidth(width: String): ListBox

    Permalink

    Deprecated.

    Deprecated. This function is deprecated and should not be used in new scripts.

  63. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  64. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  65. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  66. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  67. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  68. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped