Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / docs / source / tabs-adv.html
diff --git a/docs/source/tabs-adv.html b/docs/source/tabs-adv.html
new file mode 100644 (file)
index 0000000..4baa393
--- /dev/null
@@ -0,0 +1,44 @@
+<html>\r
+<head>\r
+  <title>The source code</title>\r
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body  onload="prettyPrint();">\r
+    <pre class="prettyprint lang-js">Ext.onReady(function(){
+
+    var tabs = new Ext.TabPanel({
+        renderTo:'tabs',
+        resizeTabs:true, // turn on tab resizing
+        minTabWidth: 115,
+        tabWidth:135,
+        enableTabScroll:true,
+        width:600,
+        height:250,
+        defaults: {autoScroll:true},
+        plugins: new Ext.ux.TabCloseMenu()
+    });
+
+    // tab generation code
+    var index = 0;
+    while(index < 7){
+        addTab();
+    }
+    function addTab(){
+        tabs.add({
+            title: 'New Tab ' + (++index),
+            iconCls: 'tabs',
+            html: 'Tab Body ' + (index) + '<br/><br/>'
+                    + Ext.example.bogusMarkup,
+            closable:true
+        }).show();
+    }
+
+    new Ext.Button({
+        text: 'Add Tab',
+        handler: addTab,
+        iconCls:'new-tab'
+    }).render(document.body, 'tabs');
+});</pre>    \r
+</body>\r
+</html>
\ No newline at end of file