Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / docs / guides / components / examples / container / app.js
diff --git a/docs/guides/components/examples/container/app.js b/docs/guides/components/examples/container/app.js
new file mode 100644 (file)
index 0000000..a3022ab
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * @example Container
+ *
+ * A basic example demonstrating how a Container contains other items using the items config.
+ */
+Ext.require('Ext.panel.Panel');
+
+Ext.onReady(function() {
+
+    var childPanel1 = Ext.create('Ext.panel.Panel', {
+        title: 'Child Panel 1',
+        html: 'A Panel',
+        width: 300,
+        height: 70
+    });
+
+    var childPanel2 = Ext.create('Ext.panel.Panel', {
+        title: 'Child Panel 2',
+        html: 'Another Panel',
+        width: 300,
+        height: 70
+    });
+
+    Ext.create('Ext.container.Viewport', {
+        items: [ childPanel1, childPanel2 ]
+    });
+});