Hi!
Sorry no one’s replied to you yet, just saw this.
You said you tried Susan’s example. What happened? It didn’t work?
Here’s a combo box I made recently for adjusting the zoom of a google map. It uses static (local) numbering.
/**
* ComboBox for selecting Zoom Level of a Google Map.
* @param config
* @constructor
*/
MyExtra.combo.ZoomLevel = function(config) {
config = config || {};
Ext.applyIf(config,{
store: new Ext.data.ArrayStore({
id: 0
,fields: ['level']
,data: [
['1'],
['2'],
['3'],
['4'],
['5'],
['6'],
['7'],
['8'],
['9'],
['10'],
['11'],
['12'],
['13'],
['14'],
['15'],
['16'],
['17'],
['18'],
['19'],
['20'],
['21']
]
})
,mode: 'local'
,displayField: 'level'
,valueField: 'level'
});
MyExtra.combo.ZoomLevel.superclass.constructor.call(this,config);
};
Ext.extend(MyExtra.combo.ZoomLevel,MODx.combo.ComboBox);
Ext.reg('myextra-combo-zoomlevel',MyExtra.combo.ZoomLevel);
And here’s an example of one that uses remote data from a processor.
MyExtra.combo.Category = function(config) {
config = config || {};
Ext.applyIf(config,{
url: MyExtra.config.connectorUrl
,baseParams: {
action: 'mgr/category/getlist'
}
,fields: ['id','name']
,mode: 'remote'
,displayField: 'name'
,valueField: 'id'
,typeAhead: true
,editable:true
,forceSelection:true
});
MyExtra.combo.Category.superclass.constructor.call(this,config);
};
Ext.extend(MyExtra.combo.Category,MODx.combo.ComboBox);
Ext.reg('myextra-combo-category',MyExtra.combo.Category);