PDA

View Full Version : height of extjs 4 combo box



shizny
5 Mar 2012, 9:28 AM
Hello,

I'm trying to adjust the height of the input field on the combobox. I've tried setting the height config option, calling setHeight and these did not work. Any advice on how I could change that input field height?

Thanks

mitchellsimoens
5 Mar 2012, 9:39 AM
Where are you setting the height? In the listConfig?

shizny
5 Mar 2012, 10:09 AM
yeah....

Ext.create('Ext.form.field.ComboBox', {
fieldLabel: 'Select a single state',
renderTo: 'simpleCombo',
displayField: 'name',
width: 320,
height: 70,
labelWidth: 130,
store: store,
queryMode: 'local',
typeAhead: true
});

and then I also tried after render using setHeight() and using the doLayout deal after that to re-render it

mitchellsimoens
5 Mar 2012, 10:34 AM
You should put it in the listConfig config

shizny
5 Mar 2012, 11:12 AM
I did this in the component definition...
listConfig: {height: 100}

no dice

shizny
5 Mar 2012, 2:16 PM
what am I missing here?

shizny
6 Mar 2012, 9:25 AM
I think we are having a communication problem here. I'm not trying to change the height of the dropdown list that appears I'm trying to change the height of the actual input part of the combo box (where you can type and get autocomplete) . Is this possible?

fabiovilas
7 May 2012, 11:04 AM
Extjs 4.1 has a bug on combobox list height :}

shizny (http://www.sencha.com/forum/member.php?178261-shizny) try: listConfig: {maxHeight: 100}

infernoz
7 May 2012, 11:20 AM
I faced similar issues and hacked around it using the the maxHeight config. Is this being tracked in the bugs forum for 4.x? If it actually is a bug, it should be created there I think.

infernoz

germanicus
4 Jan 2013, 1:34 PM
If you're just trying to change the height of the input element (the inputEl), use the fieldStyle property:
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.field.ComboBox-cfg-fieldStyle

george4buxton
16 Apr 2014, 6:59 AM
Extjs 4.1 has a bug on combobox list height :}

shizny (http://www.sencha.com/forum/member.php?178261-shizny) try: listConfig: {maxHeight: 100}

This suggested solution solved my similar issue, in version 4.2.1, 2 years later. Therefore I wish the OP would get around to marking this as "answered"