Grouping tab : TabPanel « Ext JS « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Dojo toolkit
7. Event
8. Event onMethod
9. Ext JS
10. Form Control
11. GUI Components
12. HTML
13. Javascript Collections
14. Javascript Objects
15. Javascript Properties
16. jQuery
17. Language Basics
18. Mochkit
19. Mootools
20. Node Operation
21. Object Oriented
22. Page Components
23. Rico
24. Scriptaculous
25. Security
26. SmartClient
27. Style Layout
28. Table
29. Utilities
30. Window Browser
31. YUI Library
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
JavaScript DHTML » Ext JS » TabPanel 
Grouping tab
  

<!--
/*!
 * Ext JS Library 3.0.0
 * Copyright(c) 2006-2009 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
-->
<html>
<head>
<title>Hello World Window</title>
<link rel="stylesheet" type="text/css" href="ext-3.0.0/resources/css/ext-all.css" />
<script type="text/javascript" src="ext-3.0.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-3.0.0/ext-all.js"></script>
    <!-- overrides to base library -->
    <link rel="stylesheet" type="text/css" href="ext-3.0.0/examples/ux/css/Portal.css" />
    <link rel="stylesheet" type="text/css" href="ext-3.0.0/examples/ux/css/GroupTab.css" />

    <script type="text/javascript" src="ext-3.0.0/examples/ux/GroupTabPanel.js"></script>
    <script type="text/javascript" src="ext-3.0.0/examples/ux/GroupTab.js"></script>

    <script type="text/javascript" src="ext-3.0.0/examples/ux/Portal.js"></script>
    <script type="text/javascript" src="ext-3.0.0/examples/ux/PortalColumn.js"></script>
    <script type="text/javascript" src="ext-3.0.0/examples/ux/Portlet.js"></script>

    <!-- page specific -->
    <script type="text/javascript" src="ext-3.0.0/examples/shared/examples.js"></script>
    <script type="text/javascript" src="ext-3.0.0/examples/portal/sample-grid.js"></script>

</head>

<!-- Revised from demo code in ext3.0.0 -->
<body>
<script type="text/javascript">
/*!
 * Ext JS Library 3.0.0
 * Copyright(c) 2006-2009 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
Ext.onReady(function() {
  Ext.QuickTips.init();
    
    // create some portlet tools using built in Ext tool ids
    var tools = [{
        id:'gear',
        handler: function(){
            Ext.Msg.alert('Message', 'The Settings tool was clicked.');
        }
    },{
        id:'close',
        handler: function(e, target, panel){
            panel.ownerCt.remove(panel, true);
        }
    }];

    var viewport = new Ext.Viewport({
        layout:'fit',
        items:[{
            xtype: 'grouptabpanel',
        tabWidth: 130,
        activeGroup: 0,
        items: [{
          mainItem: 1,
          items: [{
            title: 'Tickets',
                    layout: 'fit',
                    iconCls: 'x-icon-tickets',
                    tabTip: 'Tickets tabtip',
                    style: 'padding: 10px;',
            items: [new SampleGrid([0,1,2,3,4])]
          }
                {
                    xtype: 'portal',
                    title: 'Dashboard',
                    tabTip: 'Dashboard tabtip',
                    items:[{
                        columnWidth:.33,
                        style:'padding:10px 0 10px 10px',
                        items:[{
                            title: 'Grid in a Portlet',
                            layout:'fit',
                            tools: tools,
                            items: new SampleGrid([023])
                        },{
                            title: 'Another Panel 1',
                            tools: tools,
                            html: Ext.example.shortBogusMarkup
                        }]
                    },{
                        columnWidth:.33,
                        style:'padding:10px 0 10px 10px',
                        items:[{
                            title: 'Panel 2',
                            tools: tools,
                            html: Ext.example.shortBogusMarkup
                        },{
                            title: 'Another Panel 2',
                            tools: tools,
                            html: Ext.example.shortBogusMarkup
                        }]
                    },{
                        columnWidth:.33,
                        style:'padding:10px',
                        items:[{
                            title: 'Panel 3',
                            tools: tools,
                            html: Ext.example.shortBogusMarkup
                        },{
                            title: 'Another Panel 3',
                            tools: tools,
                            html: Ext.example.shortBogusMarkup
                        }]
                    }]                    
                }{
            title: 'Subscriptions',
                    iconCls: 'x-icon-subscriptions',
                    tabTip: 'Subscriptions tabtip',
                    style: 'padding: 10px;',
          layout: 'fit',
            items: [{
            xtype: 'tabpanel',
            activeTab: 1,
            items: [{
              title: 'Nested Tabs',
              html: Ext.example.shortBogusMarkup
            }]  
          }]  
          }{
            title: 'Users',
                    iconCls: 'x-icon-users',
                    tabTip: 'Users tabtip',
                    style: 'padding: 10px;',
            html: Ext.example.shortBogusMarkup      
          }]
            }{
                expanded: true,
                items: [{
                    title: 'Configuration',
                    iconCls: 'x-icon-configuration',
                    tabTip: 'Configuration tabtip',
                    style: 'padding: 10px;',
                    html: Ext.example.shortBogusMarkup 
                }{
                    title: 'Email Templates',
                    iconCls: 'x-icon-templates',
                    tabTip: 'Templates tabtip',
                    style: 'padding: 10px;',
                    html: Ext.example.shortBogusMarkup
                }]
            }]
    }]
    });
});

</script>
</body>
</html>

   
    
  
Related examples in the same category
1. Add tab panel to a window
2. Hold tab panel in a window
3. Closable tab panel
4. Disabled tab
5. Embedded Tab Panel
6. Border layout tab panel
7. Enable tab scroll
8. Set tab resizble to true
9. Set minimum tab width
10. Indicate active tab index
11. Add tab to tab panel
12. Add gear and help icon to tab header
13. Create tab, add to tab panel and then add tab panel to a FormPanel
14. Add html editor to tab panel
15. Forms can be a TabPanel
16. Set activeTab for TabPanel
17. Nested tab
18. Tab change event
19. Place TabPanel in a ViewPort
20. Scrollable tabs with a tabscroller menu
21. Tabs with auto height that resize to the content. Built from existing markup.
22. Tabs with no tab strip and a fixed height that scroll the content. Built entirely with javascript.
23. Disable a tab
24. Tab activated event
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.