I'm having problems trying to understand formatting a vbox in Sencha Touch 2. My goal is to have each child to be full height (flex divides the screen in portions). To keep it simple, I have a detail view that shows one record data, then a list of items that correlate to that record.
Right now, using flex, each child is a set height and scroll themselves. I want them to be full height and the parent only scroll. If I take the flex out nothing shows up.
Ext.define('app.view.MainView', {
updateData : function(data) {
var panels = this.query('panel[tpl]'),
pLen = panels.length,
panel;
for ( p = 0; p < pLen; p++) {
panel = panels[p];
panel.setData(data);
}
this.callParent(arguments);
},
extend: 'Ext.Container',
xtype: 'mainView',
config: {
layout: {
type: 'vbox'
},
scrollable: true,
title: '',
items: [
{
xtype: 'panel',
flex: 1,
scrollable: true,
styleHtmlContent: true,
tpl: Ext.create('Ext.XTemplate',
'<div class="view-top" id="view-{id}">' +
'<div>{body}</div>' +
'</div>')
},
{
xtype: 'component',
cls: 'dark',
html: 'Top View'
},
{
flex: 1,
xtype: 'list',
store: 'ViewStore',
variableHeights: true,
itemTpl: [
'<div>{subject}</div>'
]
}
]
}
});