2011-12-14 9 views
0

我有一個TabPanel停靠在應用程序的底部。它有幾個選項卡。我沒有打開設置選項卡的新面板,而是想添加彈出列表。點擊列表中的任何項目,新面板可能會/可能無法打開。如何在Sencha中添加Popover UI元素

我不知道如何在Sencha中添加Popovers。誰能幫忙?

這是目前我的代碼:

設置選項卡(其需要是酥料餅代替面板,這是目前) - >

App.views.Settings = Ext.extend(Ext.Panel, { 
    title : 'Settings', 
    id : 'Settings', 
    iconCls : 'settings', 

    floating : true, 
    modal : true, 
    hideOnMaskTap : true, 
    width : '20', 
    height : '20' 
}); 

主要的TabPanel(其內部上面設置面板是)

App.views.RootTab = Ext.extend (Ext.TabPanel, { 

fullscreen : true,  
tabBar : { 
    dock : 'bottom', 
    layout : {pack: 'center'} 
}, 
cardSwitchAnimation : { 
    type : 'slide', 
    cover : true 
}, 
defaults : { 
    scroll : 'vertical' 
}, 
items : [ 
    {xtype : 'MainView'}, 
    {xtype : 'Settings'} 
] 
}) 

回答

0

嘗試App.views.Settings.show('pop');

注意:如果它的唯一顯示面板彈出是你的問題,那麼問題已被問及並回答here

希望這有助於。

0

作爲this post points out,sencha有非常確切的你所需要的。

試試這個:

new Ext.Panel({ 
fullscreen : true, 
items  : [ 
    { 
     xtype : 'toolbar', 
     docked : 'top', 
     items : [ 
      { 
       text : 'Open', 
       handler : function (button) { 
        var panel = new Ext.Panel({ 
         height : 200, 
         width : 200, 
         html : 'Hello' 
        }); 

        panel.showBy(button, 'tr-bc?'); 
       } 
      } 
     ] 
    } 
]});