PDA

View Full Version : Textfield resize trouble



Skay
18 Nov 2010, 5:16 AM
I have form with several fields, all of them have anchor: '100%'. I added composite field to my form items collection with 2 items (see http://gyazo.com/168eec57633c455d8f633ca319311e02.png), but cant make textfield flexible by width as you can see on the sreenshot. I appreciate for any suggestions to resolve problem..

some code example:


{
xtype : 'compositefield',
fieldLabel: '????????',
items : [{
xtype : 'combo',
allowBlank : false,
width : 75,
hiddenName : 'orgform_id',
displayField: 'name',
valueField : 'id',
store : new Ext.data.JsonStore({
autoLoad : true,
root : 'records',
url : '/member/orgform_get_list',
fields : ['id', 'name']
})
},{
xtype : 'textfield',
width : 500, //temporary solution
anchor : '100%', //doesnt work :-(
name : 'name',
allowBlank: false
}]
},

Skay
18 Nov 2010, 12:24 PM
any help? *_*

Screamy
18 Nov 2010, 12:33 PM
I noticed that the composite configuration itself doesn't specify any sizing. Try adding anchor 100% on it as well and also inspect the parent container of the composite config to see how it handles width.



{
xtype : 'compositefield',
anchor: '100%', // this should tell the composite how to handle its width.
fieldLabel: '????????',
items : [{
xtype : 'combo',
allowBlank : false,
width : 75,
hiddenName : 'orgform_id'

Skay
18 Nov 2010, 12:46 PM
sorry, for missing some config, form has defaults:



defaults : {
anchor: '-15'
},


so, even i add anchor: '100%' to composite field as local param - it's not resolve the problem :-(

Screamy
19 Nov 2010, 11:18 AM
If you can post more of the layout code, I'm sure some of the fine minds in these forums can help.

Thx.