PDA

View Full Version : extenting comboxbox and listening 'select'



alupuli
13 Oct 2009, 9:21 AM
Extenting a combobox with default event listening as below.
But it listen only 'keydown' and not to 'select'.


Ext.ux.ComboBox = function (config) {
// call parent constructor
Ext.ux.ComboBox.superclass.constructor.call(this, config);
this.on({
render: {
scope: this,
fn: function (a) {
a.getEl().on({
keydown: fnKeyDown,
select: fnSelect,
scope: a
});
}
}
});
} // end of Ext.ux.IconCombo constructor
// extend
Ext.extend(Ext.ux.ComboBox, Ext.form.ComboBox, {}); // end of extend
function fnKeyDown() {
alert("fnKeyDown');
}
function fnSelect(){
alert("fnSelect ');
}