PERGOLA LOGO

pergola.ComboBox

System events: YES.

User events and functions: YES.

Example.

Listed: class properties/methods; prototype properties and methods; instance properties. Prototype properties and methods inherited by the Class superclass are not listed.

class

None

prototype

PROPERTIES

parent

pergola.user.

width

Defined in pergola.presentationAttributes – number (user space units).

height

Defined in pergola.presentationAttributes – number (user space units).

listItemHeight

Defined in pergola.presentationAttributes – number (user space units).

listMargin

Defined in pergola.presentationAttributes – number (user space units).

scrollSize

Defined in pergola.presentationAttributes – number (user space units) representing the Scrollbar size.

margin

0 – number (user space units).

paneY

0 – number (user space units).

selectionHandle

null – reference to selected ListItem instance.

selection

null – the value of selected ListItem instance string property.

mousewheel

"scroll" – string; allowed values are "zoom" "scroll" "" (empty string). Specifies how the mouse wheel should act on this doc. The empty string (or any value that resolves to false) disables the mousewheel.

METHODS

cancelSelection(evt[, reset])

Cancels the current selection. If the reset boolean is specified and true, the list top is reset to origin. You never need to invoke this method explicitly.

empty()

Deletes all children of this listGroup and deletes the referencing properties. You never need to invoke this method explicitly.

getListWidth()

Returns the width number of the longest string.width() in this list or, if this width is greater, this width adjusted to scrollbar display.

update(list)

Invokes this empty and creates the new list items specified by list.

Note: list is the new list. Currently it is not possible to add items to the existing list.

build(object)

this inherits the properties specified in object. Prototype properties specified in object are overridden. Creates elements, components, and property name collection. Returns this.

instance

name

String. If not passed to the constructor, gets a generated XML name (Class).

id

String. The return value of this name.toXML(). This container ID. Used as prefix where other elements' IDs are attributed.

owner

If specified at instantiation, designates the owner object. If not specified an orphan combobox is created.

container

<g> element.

doc

pergola.Doc instance.

hScrollBar

pergola.Scrollbar instance.

vScrollBar

pergola.Scrollbar instance.

resizeDummy

<rect> element.

list

If specified, array of strings representing list items.

listGroup

If list is specified in the initialization object, <g> element.

advanceY

Number representing the incremented y value of each added list item container.

"property name" in this list

If list is specified in the initialization object, collection of properties. For each element in list, this list[element] gets a pergola.ListItem instance.

layout

A layout object can be specified in the initialization object instead of list. See pergola.Layout.

fn

If specified, the function is invoked by ListItem.handleEvent() (double click) or by the ok button of the combobox panel if the combobox is not orphan, and if this selection is not null.