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'
    }

3 Answers 3

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.

1
  • It was in a container with hbox layout. Changing the layout to fit works.
    – Nabarun
    Nov 11, 2013 at 10:38
3

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

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

Best regards.

1
  • 1
    It works. I must have some wrong layout on the container that holds the combo.
    – Nabarun
    Nov 11, 2013 at 10:23
0

Can you try this using !important in css,

fieldStyle: {
    width: 100px!important;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.