Upgrade to ExtJS 3.3.1 - Released 11/30/2010
[extjs.git] / examples / window / layout.js
1 /*!
2  * Ext JS Library 3.3.1
3  * Copyright(c) 2006-2010 Sencha Inc.
4  * licensing@sencha.com
5  * http://www.sencha.com/license
6  */
7 Ext.onReady(function(){
8     
9     Ext.state.Manager.setProvider(
10             new Ext.state.SessionProvider({state: Ext.appState}));
11
12     var button = Ext.get('show-btn');
13
14     button.on('click', function(){
15
16         // tabs for the center
17         var tabs = new Ext.TabPanel({
18             region: 'center',
19             margins:'3 3 3 0', 
20             activeTab: 0,
21             defaults:{autoScroll:true},
22
23             items:[{
24                 title: 'Bogus Tab',
25                 html: Ext.example.bogusMarkup
26             },{
27                 title: 'Another Tab',
28                 html: Ext.example.bogusMarkup
29             },{
30                 title: 'Closable Tab',
31                 html: Ext.example.bogusMarkup,
32                 closable:true
33             }]
34         });
35
36         // Panel for the west
37         var nav = new Ext.Panel({
38             title: 'Navigation',
39             region: 'west',
40             split: true,
41             width: 200,
42             collapsible: true,
43             margins:'3 0 3 3',
44             cmargins:'3 3 3 3'
45         });
46
47         var win = new Ext.Window({
48             title: 'Layout Window',
49             closable:true,
50             width:600,
51             height:350,
52             //border:false,
53             plain:true,
54             layout: 'border',
55
56             items: [nav, tabs]
57         });
58
59         win.show(this);
60     });
61 });