PDA

View Full Version : [CLOSED][B3] Form autoScroll: true doesn't resize child fieldSets



ldonofrio
19 Apr 2011, 10:25 AM
Don't know if it is exactly a bug, but makes sense to me that the fieldSets inside a form (anchor layout) must be resized by the layout manager.
The fieldSet maintain his initial width and cause that scrollbars appears when you resize the browser window.
Setting autoScroll: false works but you can't handle the cases when you need a vertical scroll in large forms.

Code: (Run the code and restore the browser window => scrollbars appears)


Ext.onReady(function(){
var view = Ext.widget('viewport',{
layout: 'fit',
items: {
xtype: 'form',
title: 'Fit form',
autoScroll: true,
items: [{
xtype: 'fieldset',
layout: 'anchor',
items:[{
xtype: 'textfield',
fieldLabel: 'field1',
width: 200
},{
xtype: 'textfield',
fieldLabel: 'field2',
width: 300
}]
}]
}
});
});

ldonofrio
26 Apr 2011, 8:32 AM
seems to be solved in 4.0.0

tfg4
5 May 2011, 5:02 AM
Have same problem in 4.0.0 under any IE browser.

Have tried to separate layout and autoScroll to different containers - doesn't helps.

Any ideas how to avoid such bug?



Ext.onReady(function() {
Ext.create('Ext.Viewport', {
layout: {
type: 'border'
},
items: [{
region: 'center',
xtype: 'container',
border: true,
layout: {
type: 'auto',
align: 'stretch'
},
flex: 1,
autoScroll: true,

items:[{
xtype: 'form',
title: 'title',
autoScroll: true,
border: false,

items: {
xtype: 'form',
layout: 'anchor',
defaults: {
labelSeparator: '',
labelWidth: 100,
anchor: '100%'
},
border: false,
closable: false,

items: [{
xtype: 'textfield',
fieldLabel: 'label'
},
{
xtype: 'textfield',
fieldLabel: 'label'
}]
}
}]
}]
});
});