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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
| Ext.onReady(function(){
var toto = new Ext.Viewport({
layout: 'border',
height:500,
items: [{
region: 'north',
html: '<h1 class="x-panel-header">Page Title</h1>',
//autoHeight: true,
height:100,
border: false,
margins: '0 0 5 0'
}, {
region: 'west',
collapsible: true,
title: 'Navigation',
width: 200,
margins: '0 5 0 0'
// the west region might typically utilize a TreePanel or a Panel with Accordion layout
}, {
region: 'south',
title: 'Title for Panel',
collapsible: true,
html: 'Information goes here',
split: true,
height: 100,
minHeight: 100
}, {
region: 'east',
title: 'Title for the Grid Panel',
collapsible: true,
split: true,
width: 200,
html:'test'
//xtype: 'grid',
// remaining grid configuration not shown ...
// notice that the GridPanel is added directly as the region
// it is not "overnested" inside another Panel
}, {
region: 'center',
xtype:'panel',
layout:'ux.center',
items:{
xtype: 'form', // TabPanel itself has no title
layout:'form',
width:'50%',
//height:'20%',
autoHeight: true,
items: [{
xtype:'textfield',
fieldLabel :'test 1'
},{
xtype:'textfield',
fieldLabel :'test 1'
}]
}
}]
}).render(Ext.getBody());
}); |