View Full Version : TriggerField Width in %

5 Sep 2011, 1:07 AM
I am trying to set a TriggerField's width in % but ExtJS is not rendering it as expected. Where as a TextField renders the % width properly.

var txtfield = new Ext.form.TextField({
id: 'someid',
fieldLabel: 'test',
width: '50%' // works

var tgrfield = new Ext.form.TriggerField({
id: 'someid2',
fieldLabel: 'test',
renderTo: document.body,
width: '50%' // does not works , I have to hardcode the width like width:250

in the above example TextFiled takes 50% of the browser width, but when the TriggerField rendered its width was 123px including the button.

Any work around for making TriggerField take width in % ?
EDIT: ExtJS Version 3.3.1

8 Sep 2011, 1:13 AM
Any suggestion guys?