This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see How to Migrate to InterSystems IRIS, available on the WRC Distributions page (login required).


abstract class %ZEN.Component.abstractListBox extends %ZEN.Component.control

This is an abstract base class that provides common functionality to the various listBox controls.

Property Inventory (Including Private)

Method Inventory (Including Private)


parameter DEFAULTCONTROLCLASS = listBox;
Inherited description: The default css class used for the main element within this control. This is overridden by subclasses.


property hzScroll as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, allow this component to display horizontal scroll bars if they are needed (and its current CSS style specifies them).
Property methods: hzScrollDisplayToLogical(), hzScrollGet(), hzScrollIsValid(), hzScrollLogicalToDisplay(), hzScrollLogicalToOdbc(), hzScrollLogicalToXSD(), hzScrollNormalize(), hzScrollSet(), hzScrollXSDToLogical()
property listHeight as %ZEN.Datatype.length;
If defined, override default height of listBox.
This is a CSS length value, e.g., "400px"
Property methods: listHeightDisplayToLogical(), listHeightGet(), listHeightIsValid(), listHeightLogicalToDisplay(), listHeightLogicalToOdbc(), listHeightNormalize(), listHeightSet()
property listWidth as %ZEN.Datatype.length;
If defined, override default width of listBox.
This is a CSS length value, e.g., "400px"
Property methods: listWidthDisplayToLogical(), listWidthGet(), listWidthIsValid(), listWidthLogicalToDisplay(), listWidthLogicalToOdbc(), listWidthNormalize(), listWidthSet()
property selectedIndex as %ZEN.Datatype.integer [ InitialExpression = -1 ];
Index (0-based) of current selected option.
This is the ordinal position of the current item within the item list.
Property methods: selectedIndexDisplayToLogical(), selectedIndexGet(), selectedIndexIsValid(), selectedIndexLogicalToDisplay(), selectedIndexLogicalToOdbc(), selectedIndexNormalize(), selectedIndexSet()
property text as %ZEN.Datatype.string (XMLPROJECTION = "none");
Text (display) value of current item. Do not access this directly; use getProperty('text') instead.
Property methods: textDisplayToLogical(), textGet(), textIsValid(), textLogicalToDisplay(), textLogicalToOdbc(), textNormalize(), textSet()


method %DrawHTML()
Draw HTML for this listBox. Note that the actual value is placed in a hidden control.
method %DrawListContents()
Server-side method to provide contents of the list box. This is implemented by a subclass. If not implemented, then the listbox will render its contents on the client.
method %GetDisplayValue(pValue As %String) as %String
Lookup up the display value for the listBox given a logical value.
This is called when the control is initially drawn.
Note: this is implemented as an expression method; subclasses are free to implement this as a regular method.
clientmethod clickItem(idx) [ Language = javascript ]
User has clicked an item in the list box.
clientmethod dblClickItem(idx) [ Language = javascript ]
User has double-clicked an item in the list box.
clientmethod dragStartHandler(dragData) [ Language = javascript ]
Default drag handler for list components.
clientmethod focus() [ Language = javascript ]
Client-side method to input focus to this control.
clientmethod getItemEl(idx) [ Language = javascript ]
Return HTML element for given list item number.
clientmethod getOptionCount() [ Language = javascript ]
Return number of items in list.
This must be overridden in subclasses.
clientmethod getOptionText(idx) [ Language = javascript ]
Return the display text for the given item (0-based) in the dropdown list.
This must be overridden in subclasses.
clientmethod getOptionValue(idx) [ Language = javascript ]
Return the logical value of the given item (0-based) in the list.
This must be overridden in subclasses.
clientmethod lbKeyBlur() [ Language = javascript ]
Focus taken from the invisible edit control.
clientmethod lbKeyDownHandler(evt) [ Language = javascript ]
Process keydown event within the invisible edit control.
clientmethod lbKeyFocus() [ Language = javascript ]
Focus passed to the invisible edit control.
clientmethod lbKeyPressHandler(evt) [ Language = javascript ]
Process keypress event within the invisible edit control.
clientmethod moveToItem(dir) [ Language = javascript ]
Move to a new item in the listBox. dir is "up","down","left","right" Returns true if move was successful.
clientmethod onCreate() [ Language = javascript ]
Initialize additional client-side values
clientmethod selectItem(idx) [ Language = javascript ]
User has selected an item in the list box.
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
Assume that subclasses that simply wrap HTML controls have named the control 'control' or else have overridden this method.

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)