1
lxl
2022-09-16 cb746cca26fa024018d7ce772ba6a96557ea768b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 ]
    });
});