Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / docs / guides / components / examples / container / app.js
1 /**
2  * @example Container
3  *
4  * A basic example demonstrating how a Container contains other items using the items config.
5  */
6 Ext.require('Ext.panel.Panel');
7
8 Ext.onReady(function() {
9
10     var childPanel1 = Ext.create('Ext.panel.Panel', {
11         title: 'Child Panel 1',
12         html: 'A Panel',
13         width: 300,
14         height: 70
15     });
16
17     var childPanel2 = Ext.create('Ext.panel.Panel', {
18         title: 'Child Panel 2',
19         html: 'Another Panel',
20         width: 300,
21         height: 70
22     });
23
24     Ext.create('Ext.container.Viewport', {
25         items: [ childPanel1, childPanel2 ]
26     });
27 });