Extends: Jx.Button.Multi
A drop down list of selectable items. Items can be either a string, an image or both.
new Jx.Button.Combo({
label: 'Choose a symbol',
items: [
{label: 'Star', image: 'images/swatches.png', imageClass: 'comboStar'},
{label: 'Square', image: 'images/swatches.png', imageClass: 'comboSquare'},
{label: 'Triangle', image: 'images/swatches.png', imageClass: 'comboTriangle'},
{label: 'Circle', image: 'images/swatches.png', imageClass: 'comboCircle'},
{label: 'Plus', image: 'images/swatches.png', imageClass: 'comboPlus'},
{label: 'Cross', image: 'images/swatches.png', imageClass: 'comboCross'}
],
onChange: function(combo) { alert('you selected ' + combo.getValue()) }
})| change | triggered when the user selects a new item from the list |
Copyright © 2008, DM Solutions Group Inc.
This file is licensed under an MIT style license
| Jx. | Extends: Jx.Button.Multi |
| Properties | |
| currentSelection | {Object} current selection in the list |
| Options | |
| editable | boolean, default false. |
| label | string, default ‘’. |
| Constructor | |
| Jx. | create a new instance of Jx.Combo |
| Functions | |
| setEnabled | enable or disable the combo button. |
| valueChanged | invoked when the current value is changed |
| onKeyPress | Handle the user pressing a key by looking for an ENTER key to set the value. |
| add | add a new item to the pick list |
| remove | Remove the item at the given index. |
| TODO | |
| implement remove? | |
| Functions | |
| setValue | set the value of the Combo |
| getValue | Return the current value |
enable or disable the combo button.
setEnabled: function( enabled )
invoked when the current value is changed
valueChanged: function()
Handle the user pressing a key by looking for an ENTER key to set the value.
onKeyPress: function( e )
add a new item to the pick list
add: function()
Remove the item at the given index.
remove: function( idx )
set the value of the Combo
setValue: function( value )
Return the current value
getValue: function()