PDA

View Full Version : [3.1.1.] Column Layout inside Tabs Resizing and cutting off fields



froggman2k
2 Mar 2010, 11:32 AM
Hello all-

I am having an issue with column layout inside of a tab panel. Basically, if you run the code below, when the first tab initially loads, the widths and everything are perfect. If you click to the second tab, then click back to the first, however, the first tab's layout gets all screwy and the combo boxes in the first column get cut off...



var tabs = new Ext.TabPanel({
title: 'test columns in tabs'
, activeTab: 0
, width: 790
, plain: true
, frame: false
, hideMode: 'offsets'
, bodyStyle: 'padding: 8px;'
, defaults: {
border: false
, plain: true
, frame: false
}
, items: [{
xtype: 'panel'
, defaults: {
border: false
, plain: true
, frame: false
}
, title: 'tab with combos'
, layout: 'column'
, columns: 2
, items: [{
xtype: 'form'
, labelWidth: 195
, columnWidth: .6
, defaults: {
border: false
, plain: true
, frame: false
}
, items: [{
xtype: 'combo'
, fieldLabel: 'Microsoft Word Documents'
, store: new Ext.data.ArrayStore({
fields: ['text']
, data: [['lalala']]
})
, displayField: 'text'
}, {
xtype: 'combo'
, fieldLabel: 'Microsoft Powerpoint Documents'
, store: new Ext.data.ArrayStore({
fields: ['text']
, data: [['lalala']]
})
, displayField: 'text'
}]
}, {
xtype: 'form'
, defaults: {
border: false
, plain: true
, frame: false
}
, items: [{
xtype: 'combo'
, fieldLabel: 'Audio Files'
, defaults: {
border: false
, plain: true
, frame: false
}
, store: new Ext.data.ArrayStore({
fields: ['text']
, data: [['lalala']]
})
, displayField: 'text'
}, {
xtype: 'combo'
, fieldLabel: 'Video/Movie Files'
, store: new Ext.data.ArrayStore({
fields: ['text']
, data: [['lalala']]
})
, displayField: 'text'
}]
}]
}, {
title: 'tab without'
, html: 'click here, then click back'
}]
});


I have also attached screenshots of the initial load look, and the post-changing-tabs look.

Anyone run into this before? I searched the forums, and tried adding "hideMode: 'offsets'" to both the tab panel and the column layout, but neither of those made any difference.

Thanks!

Animal
2 Mar 2010, 1:10 PM
Overnesting in a no-layout Panel

froggman2k
2 Mar 2010, 2:10 PM
Sorry, could you expand on that a little? Which panel would need a defined layout, and what layout would be equivalent to a "non-layout".... Meaning what layout won't force some other constraint? I apologize, I haven't ever read anything about overnesting with Ext.