Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJS 4 How to set the width of a ComboBox

Tags:

extjs

extjs4.2

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'
    }
like image 424
Nabarun Avatar asked Dec 26 '22 18:12

Nabarun


2 Answers

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.

like image 129
Harry Avatar answered Jan 12 '23 14:01

Harry


Width does work, you can play with this code to watch it:

https://fiddle.sencha.com/#fiddle/1g3

Best regards.

like image 30
code4jhon Avatar answered Jan 12 '23 15:01

code4jhon