2009-07-17 13 views
6

Ho un ViewPort che voglio aprire un numero di schede. Una delle mie schede è molto lunga e dovrebbe uscire dalla parte inferiore della pagina. Tuttavia, la barra di scorrimento manca dal lato.ExtJS TabPanel barra di scorrimento mancante in ViewPort

Ecco la mia messa a punto della vista:

var viewport = new Ext.Viewport({ 
    layout:'border', 
    enableTabScroll:true, 
    deferredRender:true, 
    items:[ 
     new Ext.BoxComponent({ // raw 
      region:'north', 
      el: 'north', 
      height:32 
     }),{ 
      region:'west', 
      id:'west-panel', 
      title:'West', 
      split:true, 
      width: 200, 
      minSize: 175, 
      maxSize: 400, 
      collapsible: false, 
      margins:'0 0 0 5', 
      layout:'accordion', 
      deferredRender: true, 
      layoutConfig:{ 
       animate:true 
      }, 
      items: [{ 
       contentEl: 'west', 
       title:'Navigation', 
       border:false, 
       collapsible: false, 
       iconCls:'nav' 
      }] 
     }, 
     new Ext.TabPanel({ 
      region:'center', 
      id:'center', 
      activeTab:0, 
      items:[{ 
       contentEl:'center1', 
       title: 'Close Me', 
       closable:true, 
       layout:'fit', 
       autoScroll:true 
      }] 
     }) 
    ] 
}); 

Ed ecco il mio aggiungere codice scheda:

Ext.get("addplace").on('click', function() { 
    centerTabs = Ext.getCmp('center'); 
    tab = centerTabs.add(new Ext.TabPanel({ 
     iconCls: 'tabs', 
     id: 'add_place_tab', 
     autoLoad: {url: '/admin/addplace', scripts : true,}, 
     title: 'Add Place', 
     loadMask: false, 
     closable:true 
    })); 
    centerTabs.setActiveTab(tab); 
}); 

Grazie in anticipo!

risposta

13

Nel codice in alto, provare a impostare la proprietà autoScroll a true:

new Ext.TabPanel({ 
    region:'center', 
    id:'center', 
    activeTab:0, 
    defaults:{ autoScroll:true }, // here 
    items:[{ 
     contentEl:'center1', 
     title: 'Close Me', 
     closable:true, 
     layout:'fit', 
     autoScroll:true 
    }] 
}) 

In questo modo tutte le schede da aggiungere in seguito avrà autoScroll automaticamente impostato su true.

+0

Ah, questo è quello che mi mancava. Grazie! – jeffkolez

Problemi correlati