PDA

View Full Version : How do you position a list after a variable-height (due to template) panel ?



d5chris
20 Mar 2011, 5:36 PM
Hi,
How do you position a list after a variable-height (due to template) panel ?

I have a template panel like so:


var templatePanel = new Ext.Panel({
tpl: [
'<tpl for="show">',
'<p class="title">{title}</p>',
'</tpl>',
'<p class="summary_header">Episodes</p>',
'<tpl for="episodes">',
'<p>{title}</p>',
'</tpl>',
]
});

As you can imagine, the above panel's height varies depending on how many episodes are in the store that it is bound to.

In the container panel, i want the above template to have a list directly beneath it, like so:


items: [templatePanel, listPanel]

However, the list appears to cover the templatePanel, as if it does not know how many pixels high it is, and doesn't know how to simply 'flow' after it in the html.

Any suggestions how to fix this?