PDA

View Full Version : Stacked panels



tfrugia
13 Jul 2010, 10:13 AM
I am trying to stack 2 panels, both of which use templates:



generalInfo = new Ext.Panel({
cls: 'subTab',
dockedItems: new Ext.Toolbar({
titleCls: 'subTabDockedItem',
xtype: 'toolbar',
dock: 'top',
title: 'Contact Info'
}),
styleHtmlContent: true,
tpl: tpl,
});

ministryStats = new Ext.Panel({
cls: 'subTab',
dockedItems: new Ext.Toolbar({
titleCls: 'subTabDockedItem',
xtype: 'toolbar',
dock: 'top',
title: 'Ministry Stats'
}),
styleHtmlContent: true,
tpl: tplStats
});

var newP = new Ext.Panel({
fullscreen: true,
id: 'ministryInfoPanel' + rowData[0].MINISTRYID,
layout: {
type: 'vbox',
align: 'stretch'
},
items: [generalInfo, ministryStats],
dockedItems: [new Ext.Toolbar({
ui: 'light',
dock: 'top',
title: 'Ministries',
items: [new Ext.Button({
text: 'Back',
ui: 'back'
)]
})]
});



The problem is once I use generalInfo.update() and ministryStats.update(), the panels are stacked right on top of each other (the text from both panels shows in the same spot).

If I explicitely set the height on each panel it works fine, but the data is not always uniform. How do I implement autoheight?

TommyMaintz
14 Jul 2010, 11:39 AM
autoHeight panels with dockedItems is not supported yet. We are aware of this issue and this will be fixed asap.