2011-10-31 42 views
0

我將tabPanel的標籤欄放在頂部位置並保留底部樣式,所以請參閱this thread,顯示結果是確定的,但標籤欄不能擴展所有空間頁面右上角顯示背景。 (在1024像素分辨率下約爲30像素)。 當使用Chrome瀏覽器查看它時,如果我打開開發者工具然後關閉它,那麼標籤欄變成可用。 (佔用所有屏幕)。 我試着tabPanel.doLayout()或viewPort.doLayout(),兩者都不起作用。sencha touch:標籤欄的寬度不能延伸到屏幕寬度

請給出任何建議,謝謝!

var tabPanel = new Ext.TabPanel({ 
     id:'tabPanel', 
     tabBar : { 
      dock : 'top', 
      layout : { pack : 'right' }, 
     }, 
     listeners: { 
       single: true, 
       afterlayout: function (panel) { 
        var dom = Ext.select('.x-docked-top', panel.getEl().dom).first().dom; 
        dom.className = dom.className.replace('x-docked-top', 'x-docked-bottom');     
       } 
     }, 
     defaults: { 
       scroll: 'vertical' 
     }, 
     cardSwitchAnimation: { 
      type: 'slide', 
      duration: 1 
     }, 
     flex: 1, 
     ui: 'light', 
     items : [ 
      { 
       iconCls : 'icon1', 
       items: [ scanPanel ]   
      }, 
      { 
       iconCls : 'icon2', 
       items: [ logPanel ]   
      } 
     ]  
}); 

...

var viewPort = new Ext.Panel({ 
    fullscreen : true, 
    layout : { 
     type : 'fit', 
     align : 'stretch' 
    }, 
    items : [ tabPanel] 
}); 

回答

0

的Ext.Panel有一個默認設置進行填充,儘量的TabBar進入Ext.Panel。