class %ZEN.Component.combobox
extends abstractComboBox
A combobox is a specialized type of abstractComboBox that
presents the user with a pre-defined set of options.
The contents displayed by the combobox dropdown list are
defined using a set of %ZEN.Auxiliary.option objects.
For example:
<combobox id="comboboxEdit" label="Editable" editable="true">
<option value="1" text="Apple" />
<option value="2" text="Banana" style="font-size: 2.5em; "/>
</combobox>
property displayList
as %ZEN.Datatype.csv(ZENLOCALIZE=1);
(Optional) A csv-list of values used for display values within this combobox.
This is only used if the valueList property is defined.
The entire list is a localized value.
If your data include commas, escape them with "\,".
property options
as list of %ZEN.Auxiliary.option(XMLELEMENTREF=1,XMLPROJECTION="ELEMENT",XMLREF=1,XMLTYPECONSTRAINT="CHOICE",ZENSETTING=0);
Set of options displayed within the combobox. Each option is a %ZEN.Auxiliary.option
object. For each option you specify a logical value, a display value, and an optional CSS style.
property valueList
as %ZEN.Datatype.csv;
(Optional) A csv-list of values used for logical values within this combobox.
If this is defined, then the options property is ignored.
If your data include commas, escape them with "\,".
method %GetDisplayValue(pValue As %String)
as %String
Lookup up the display value for the combobox given
a logical value.
This is called when the control is initially drawn.
method %SetDefaultValues()
This method fills in reasonable default values for
this control. Used by tools (such as Control Tester) to
dynamically create controls.
method appendOption(value, text, style)
[ Language = javascript ]
Create a new option and append it to this combobox.
If text is omitted, then value is used as the display value.
method getOption(idx)
[ Language = javascript ]
Return the %ZEN.Auxiliary.option option object
associated with the given item (0-based) in the dropdown list.
If valueList is defined, then this returns null.
method getOptionCount()
[ Language = javascript ]
Return number of items in dropdown list.
method getOptionText(idx)
[ Language = javascript ]
Return the display text for the given item (0-based) in the dropdown list.
method getOptionValue(idx)
[ Language = javascript ]
Return the logical value of the given item (0-based) in the dropdown list.
method removeOption(index)
[ Language = javascript ]
Remove an option from this combobox.
index is the index number (0-based) of the option.
method resetOptions()
[ Language = javascript ]
Remove all options from this combobox.
Clears the current value of the combobox.
If there is a value for valueList it is cleared as well.
method setOption(index, value, text, style)
[ Language = javascript ]
Set the properties of an option within this combobox.
index is the index number (0-based) of the option.
If text is omitted, then value is used as the display value.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.