Home
|
Quick Reference
dynapi.gui.HTMLListbox
- Quick Reference
Inherit:
HTMLComponent
Constructor
HTMLListbox(css,items,length,multiSelect,title,elmName)
...
items - (Object) Used to add items to the list box.
example of items argument:
var items = { value1: text1, value2: text2 }
Events
onclick(e)
...
onchange(e)
...
onmouseup(e)
...
onmousedown(e)
...
onmouseover(e)
...
onmouseout(e)
...
Design Properties
[none]
Public Methods
addItem(text,value,selected)
...
getInnerHTML()
...
getItem(index)
Returns an item object from the list box. The object returned contains a value and text property.
index
- Value (String) or index (number) of the item.
getSelected()
Returns the value of the selected item. If the listbox has more than one item selected then an array is returned.
removeAllItems()
Removes all items from the list
removeItem(index)
Removes an item from the list
index
- Value (String) or index (number) of the item.
setElementName(t)
Set form element name
setSelected(index)
...
index
- Value (String) or index (number) of the item.
setMultiSelect(b)
Enables or disables multiple selection
sortBy(vt,desc)
Sort the items inside the list.
vt - (String) Sort by "text" or "value"
desc - (Boolean) Sort in descending order
Private Methods
_buildOptions()
...
_oldHCLBEvt(evt,elm)
A link to HTMLComponent.prototype._e(evt,elm) function
_assignElm()
....
_e(evt,elm)
Component Event Handler
_getDSValue()
Data-Aware function
_getSelValues()
...
_setDSValue(d)
Data-Aware function
Static Methods
[none]