4

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'
    }
Krish R
  • 22,583
  • 7
  • 50
  • 59
Nabarun
  • 711
  • 1
  • 13
  • 23

3 Answers3

7

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.

Harry
  • 678
  • 10
  • 26
3

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

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

Best regards.

code4jhon
  • 5,725
  • 9
  • 40
  • 60
0

Can you try this using !important in css,

fieldStyle: {
    width: 100px!important;
}
Krish R
  • 22,583
  • 7
  • 50
  • 59