PDA

View Full Version : [SOLVED] Which event to use on combobox list resize ?



Iarwa1N
9 Aug 2009, 8:18 PM
I couldn't find the event that fires on when the comboboxes list resizes (resizable : true on combo config).

I tried the resize event on combo and tried to attach a resize event on list element (combobox.list.on('resize',fn)) but it did not work.

any ideas about this problem ?

chesstrix
9 Aug 2009, 11:04 PM
There is a resize listener on combobox so if your isn't working maybe post some code. If you are using a store to populate your combobox then you can put a load listener on that.

Condor
9 Aug 2009, 11:08 PM
You can put a resize listener on the list resizer, but you'll have to wait until the list is created, e.g.

var combobox = new Ext.form.ComboBox({
initList: function(){
var b = !this.list && this.resizable;
this.constructor.prototype.initList.call(this);
if(b){
this.resizer.on('resize', function(){
...
});
}
}
});

Iarwa1N
10 Aug 2009, 7:22 PM
You can put a resize listener on the list resizer, but you'll have to wait until the list is created, e.g.

var combobox = new Ext.form.ComboBox({
initList: function(){
var b = !this.list && this.resizable;
this.constructor.prototype.initList.call(this);
if(b){
this.resizer.on('resize', function(){
...
});
}
}
});

thanks a lot Condor, it works :)