Results 1 to 1 of 1

Thread: Display Content While No Tab is Active

  1. #1
    Sencha User
    Join Date
    Mar 2009
    Location
    Dallas, TX
    Posts
    20
    Vote Rating
    2
      0  

    Post Display Content While No Tab is Active

    I've created a small plugin that will allow you to apply some HTML or an Ext panel to a tab panel when no tab is active. I created this plugin because there are some times when I need a tab panel but don't want a tab to be active when the tab panel is rendered. It's pretty easy to use, just create a new instance of the plugin and assign it to the plugin array of the tab panel you want to use it on. I have included some screenshots and a zip file containing the source and an example.

    To create the plugin using HTML content:
    PHP Code:
    var defaultTabPanel1 = new Ext.ux.plugins.TabPanelDefaultPanel({
        
    html'<span style="text-align:center;font-size:850%;font-weight:900;">TEST</span>',
    }); 
    Tp create the plugin using an Ext panel config option:
    PHP Code:
    var defaultTabPanel2 = new Ext.ux.plugins.TabPanelDefaultPanel({
        
    panel: {
            
    title'<div style="margin:3px;font-size:20px"><b><i>Sample Test Form</i></b></div>',
            
    layout'form',
            
    autoScrolltrue,
            
    bordertrue,
            
    defaultType'textfield',
            
    defaults: { anchor'90%'allowBlankfalse },
            
    items: [
                new 
    Ext.form.TextField({ name'textfield1'fieldLabel'Text Field 1' }),
                new 
    Ext.form.TextField({ name'textfield2'readOnlytruefieldLabel'Text Field 2' }),
                new 
    Ext.form.TextArea({ name'textarea1'height200fieldLabel'Text Area 1' })
            ]
        }
    }); 
    There is a function that will deactivate the current tab which will cause the plugin to be shown:
    PHP Code:
    defaultTabPanel1.showPanel(); 
    If you create the plugin with both an HTML and panel parameter, the HTML will take priority and the panel parameter will be ignored.

    I've tested this with ExtJS 2.x and 3.x and it works normally in both enviroments.

    Let me know what you think.
    Attached Images Attached Images
    Attached Files Attached Files

Similar Threads

  1. [OPEN] [FIXED-429][2.x/3.x] IE8 Active tab display not quite correct
    By sdrew in forum Ext 3.x: Bugs
    Replies: 12
    Last Post: 21 Mar 2011, 3:47 AM
  2. why the content of old tab still display on page when switch to new tab
    By mychirs in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 12 May 2009, 5:50 AM
  3. why the content of old tab still display on page when switch to new tab
    By mychirs in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 10 May 2009, 8:55 PM
  4. Content of tab visible to DOM, but not active
    By metrospectrev in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 11 Nov 2007, 2:22 PM
  5. help! how to close content of tab but leave tabstrip active
    By technetium in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 1 Aug 2007, 3:57 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •