From: Alan Knowles Date: Wed, 11 Aug 2010 06:50:00 +0000 (+0800) Subject: Roo/form/ComboBox.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=b90ee2b2576519264d1baaf22fbddf163f4450a5;p=roojs1 Roo/form/ComboBox.js --- diff --git a/Roo/form/ComboBox.js b/Roo/form/ComboBox.js index ebc8215312..8b6e601b8b 100644 --- a/Roo/form/ComboBox.js +++ b/Roo/form/ComboBox.js @@ -291,6 +291,11 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, { */ disableClear : false, + //private + addicon : false, + editicon: false, + + // private onRender : function(ct, position){ Roo.form.ComboBox.superclass.onRender.call(this, ct, position); @@ -510,6 +515,19 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, { this.list.setWidth(lw); this.innerList.setWidth(lw - this.list.getFrameWidth('lr')); } + + if(typeof w == 'number'){ + var tw = this.trigger.getWidth(); + tw += this.addicon ? this.addicon.getWidth() : 0; + tw += this.editicon ? this.editicon.getWidth() : 0; + this.el.setWidth( + this.adjustWidth('input', + w - tw; + ) + ); + } + + }, /**