Results 1 to 5 of 5

Thread: border layout Panel in TabPanel

  1. #1
    Sencha User
    Join Date
    May 2011
    Posts
    2

    Exclamation border layout Panel in TabPanel

    Hello?I have a panel that is border layout, I put it into a TabPanel?but the panel doesn`t show, why?If the panel is other layout, it can show on the TabPanel

  2. #2
    Sencha User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895

    Default

    Look at line 28 of the code sample you provided.

    Oh, wait...


  3. #3
    Sencha User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895

    Default

    Here's a terse/functional code sample which features a border layout panel as the first/only tab of a TabPanel.

    Code:
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        
        <link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />
        <link rel="stylesheet" type="text/css" href="ext/resources/css/xtheme-blue.css" id="theme" />
        
        <script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="ext/ext-all.js"></script>
        
        <script type="text/javascript">
          Ext.onReady(function() {
            Ext.BLANK_IMAGE_URL = 'ext/resources/images/default/s.gif';
            Ext.QuickTips.init();
             
            var t = new Ext.TabPanel({
              renderTo:'contentDiv',
              activeTab: 0,
              height: 600,
              width: 800,
              items:[{
                xtype: 'panel',
                layout: 'border',
                title: 'Tab 1',
                items: [{
                  xtype: 'panel',
                  region: 'north',
                  frame: true,
                  height: 50,
                  html: 'This is the North Region.'
                },{
                  xtype: 'panel',
                  region: 'center',
                  layout: 'fit',
                  html: 'This is the Center Region.'
                }]
              }]
            });   
    
          });
        </script>
      </head>
      <body>
         <div id="contentDiv">
         </div>
      </body>
    </html>

  4. #4
    Sencha User
    Join Date
    May 2011
    Posts
    2

    Default

    var tabPnl = new tabPanelCreater({
    plain:true,
    heigth:500,
    activeTab : 0,
    width:950,
    frame:true,
    border:true,
    applyTo:'center'

    });

    var mainPnl = new panelCreater({
    layout:'border',
    title:'????',
    height:500,
    border:true,
    autoScroll:false,
    frame:true,
    items:[{title:'west',region:'west',width:20},{title:'center', region:'center'},{title:'east', region:'east',width:30}]
    });

    tabPnl.add(mainPnl);

    this is my code,but the panel in the tabpanel does`t show content

  5. #5
    Sencha User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895

    Default

    Try changing this:

    Code:
    tabPnl.add(mainPnl);
    To This:

    Code:
    tabPnl.add(mainPnl);
    tabPnl.doLayout();

Posting Permissions

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