extjs tab 的新增面板功能 总是插入在最后 一个我想让新增的面板在第一个位置显示 如何设置呢

解决方案 »

  1.   

    setActiveTab( String/Panel tab ) 
    设置特定的tab为活动面板。此方法触发beforetabchange事... 
    设置特定的tab为活动面板。此方法触发beforetabchange事件,若处理函数返回false则取消tab切换。Sets the specified tab as the active tab. This method fires the beforetabchange event which can return false to cancel the tab change. 
    参数项: 
    tab : String/Panel 
    活动面板或其id。The id or tab Panel to activate 
    返回值: 
    void 
    使用
    tabPanel.setActiveTab("要激活的面板id");
     
      

  2.   

    不使用add方法添加面板,使用inert方法不就行了?
    tabPaenl.insert(0,newpan);
      

  3.   

    insert方法
    tabPanel.insert(0,newpan);
    键盘真难用
      

  4.   

    谢谢 最近做项目用到extjs 新手一个 希望多多指教