Zimlet JavaScript API Reference - DwtComboBox

Class DwtComboBox


Extends DwtComposite.

This class represents a combo box.

Defined in: DwtComboBox.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DwtComboBox(params, parent, useLabel, inputParams, className, posStyle, maxRows, layout, autoScroll)
Creates a combo box.
Method Summary
Method Attributes Method Name and Description
 
add(text, value, selected)
Adds an entry to the combo box list.
 
Adds the change listener.
 
Gets the text of the currently selected entry.
 
Gets the value of the currently selected entry.
 
remove(value)
Removes the specified value from the list.
 
Removes all the items in the list.
 
Removes the change listener.
 
setText(text)
Sets the selected text.
 
setValue(value)
Sets the value.
Methods borrowed from class DwtComposite:
addChild, cleanupSeparators, clear, dispose, getChild, getChildren, getNumChildren, getTabGroupMember, removeChild, removeChildren
Methods borrowed from class DwtControl:
addClassName, addControlListener, addDisposeListener, addListener, appendElement, blur, clearContent, clearHandler, condClassName, delClassName, focus, getBounds, getClassName, getContent, getCursor, getData, getDragBox, getDragSource, getDropTarget, getEnabled, getFocusElement, getH, getHtmlElement, getHTMLElId, getInsetBounds, getInsets, getLocation, getMargins, getOpacity, getOuterSize, getPosition, getScrollContainer, getScrollStyle, getSize, getTooltipBase, getToolTipContent, getVisibility, getVisible, getW, getX, getXW, getY, getYH, getZIndex, hasFocus, isAlertShown, isDisposed, isInitialized, isListenerRegistered, notifyListeners, preventContextMenu, preventSelection, removeAllListeners, removeControlListener, removeDisposeListener, removeListener, reparent, reparentHtmlElement, replaceElement, setBounds, setClassName, setContent, setCursor, setData, setDisplay, setDisplayState, setDragBox, setDragSource, setDropTarget, setEnabled, setEventPropagation, setFocusElement, setHandler, setHtmlElementId, setLocation, setOpacity, setPosition, setScrollStyle, setSize, setToolTipContent, setVisibility, setVisible, setZIndex, showAlert, zShow
Class Detail
DwtComboBox(params, parent, useLabel, inputParams, className, posStyle, maxRows, layout, autoScroll)
Creates a combo box.
Author: Dave Comfort.
Parameters:
{hash} params
a hash of parameters
{DwtComposite} parent
the parent widget
{boolean} useLabel
Set to true if the value should be shown in a DwtLabel. Defaults to false, showing it in a DwtInputField.
{hash} inputParams
params for the input (see DwtInputField or DwtLabel)
{string} className
the CSS class
{constant} posStyle
the positioning style (see DwtControl)
{int} maxRows
The number of maxRows needed in drop down(see DwtMenu)
{constant} layout
The layout of the drop down(see DwtMenu)
{boolean} autoScroll
Set to true if auto scroll to the input text is needed. Defaults to false.
Method Detail
add(text, value, selected)
Adds an entry to the combo box list.
Parameters:
{string} text
the user-visible text for the entry
{string} value
the value for the entry
{boolean} selected
if true, the entry is selected

addChangeListener(listener)
Adds the change listener.
Parameters:
{AjxListener} listener
the listener

{string} getText()
Gets the text of the currently selected entry.
Returns:
{string} the text

{string} getValue()
Gets the value of the currently selected entry. If the entry is one that was not added via the add method (that is, if it was typed in by the user) then null is returned.
Returns:
{string} the value

remove(value)
Removes the specified value from the list.
Parameters:
{string} value
the value

removeAll()
Removes all the items in the list.

removeChangeListener(listener)
Removes the change listener.
Parameters:
{AjxListener} listener
the listener

setText(text)
Sets the selected text.
Parameters:
{string} text
the text

setValue(value)
Sets the value.
Parameters:
{string} value
the value

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:27 GMT-0400 (EDT)