ExtJS 4 How to set the width of a ComboBox

Nabarun picture Nabarun · Nov 10, 2013 · Viewed 11.5k times · Source

How can I set the width of a ComboBox input field? I tried to set the width and it does not work. I could not find any CSS variable for width though there is one for height ($form-field-height).

I have also tried to set width in fieldStyle.

    fieldStyle: {
        width: '100px'
    }

I am able to change the height though. The following works.

    fieldStyle: {
        height: '60px'
    }

Answer

Tủn picture Tủn · Nov 11, 2013

code4jhon answered it, I just want to add some notes: Is your combobox is inside a parent container with a auto-fixed layout type: like hbox, vbox,...? You can't change width and height because it's controlled by its parent layout.