I am trying to add 2 panels to an already created panel (layout: stretch, type: hbox). I get no errors in firebug, but nothing seems to happen on my screen.
Here is the code that adds the 2 panels to the already defined panel.
var variablesAttributesPanel = new Ext.Panel({
id: 'variablesAttributesPanel',
title: 'variablesAttributesPanel',
autoScroll: true,
html: 'yeah1',
layout: {
align: 'stretch',
type: 'vbox'
},
flex: 1
});
var locationDatePanel = new Ext.Panel({
id: 'locationDatePanel',
autoScroll: true,
title: 'locationDatePanel',
html: 'yeah2',
layout: {
align: 'stretch',
type: 'vbox'
},
flex: 1
});
Ext.getCmp('datasetInfoPanel').add(variablesAttributesPanel);
Ext.getCmp('datasetInfoPanel').add(locationDatePanel);
Ext.getCmp('datasetInfoPanel').update();
Ext.getCmp('datasetInfoPanel').doLayout();
Any ideas on what I am doing wrong?
Edit
var datasetInfoPanel = new Ext.Panel({
id: 'datasetInfoPanel',
title: "Dataset Information",
region: "center",
autoScroll: true,
layout: {
align: 'stretch',
type: 'hbox'
},
});