PDA

View Full Version : How to avoid the scrollbar in a combo box



marxan
27 Jun 2013, 2:45 AM
Hello,

I'd like to avoid the scrollbar in my list of value in a combo.

Is it possible ? When I have a certain number of values it comes automatically. I have tried autoScroll: false but it still appears. Can we decide to make it appears only if there are more lines (for example if there are more than 20 lines?

Thanks.

friend
27 Jun 2013, 3:38 AM
See the docs for the overflowY (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.ComboBox-cfg-overflowY) configuration property on a Combobox. This will let you control the display of a vertical scroll bar at configuration time.

After that, you can dynamically manipulate overflow via the setOverflowXY() (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.ComboBox-method-setOverflowXY) method.

Also take a look at the listConfig (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.ComboBox-cfg-listConfig) property, where this gives you control over the BoundList associated with the Combo.