app.js 609 B

123456789101112131415161718192021222324252627
  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. Ext.onReady(function() {
  8. var childPanel1 = Ext.create('Ext.panel.Panel', {
  9. title: 'Child Panel 1',
  10. html: 'A Panel',
  11. width: 300,
  12. height: 70
  13. });
  14. var childPanel2 = Ext.create('Ext.panel.Panel', {
  15. title: 'Child Panel 2',
  16. html: 'Another Panel',
  17. width: 300,
  18. height: 70
  19. });
  20. Ext.create('Ext.container.Viewport', {
  21. items: [ childPanel1, childPanel2 ]
  22. });
  23. });