X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6746dc89c47ed01b165cc1152533605f97eb8e8d..f562e4c6e5fac7bcb445985b99acbea4d706e6f0:/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 index 00000000..a3022abc --- /dev/null +++ b/docs/guides/components/examples/container/app.js @@ -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 ] + }); +});