layout.js
上传用户:dawnssy
上传日期:2022-08-06
资源大小:9345k
文件大小:1k
源码类别:

JavaScript

开发平台:

JavaScript

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