PDA

View Full Version : Override Ext.view.BoundList to set minWidth value to 40



punith.mailme
11 Jun 2012, 2:43 AM
Hi Guys,

I have a small combobox of say 50px to dispaly just 2 char data, I have to reduce the size of data view to 50px which is defaults to 70px.

i have made my combobox matchFieldWidth : false, and want to use listConfig and make Ext.view.BoundList.minWidth - (defaults to 70 to 50px)..

{
xtype : 'combobox',
width : 60,
editable : false,
store : 'AvailableStatesList',
displayField : 'label',
valueField : 'value',
emptyText : bundle.getMsg('vl.locate.label.emptystates'),
editable : false,
matchFieldWidth : false,
listConfig: boundConst,
id : 'cityList'
}

36115


36116

Can somebody please guide me

skirtle
11 Jun 2012, 4:00 AM
Perhaps I'm not following but you seem to have answered your own question. As you said in your post, you should just need to use the listConfig to set the minWidth to 50:


listConfig: {
minWidth: 50
}

Not sure I understand what else you're asking.

punith.mailme
11 Jun 2012, 4:15 AM
ah... thanks :) still learning.
An optional set of configuration properties that will be passed to the Ext.view.BoundList (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.view.BoundList)'s constructor. Any configuration that is valid for BoundList can be included.

Above statement made me little confused.

Thanks
Punith

skirtle
11 Jun 2012, 4:17 AM
Take a look at the source code for ComboBox and see how it uses listConfig. Hopefully that'll help to clarify a little.