如何在ExtJs的选项卡栏中动态添加tbar

问题描述

我需要在tabpanel的第二个标签页中动态添加tbar(不想在tbar中动态添加项目,而是需要根据某些条件添加tbar,否则应该通过bot添加),下面是我的代码:

var wind = Ext.create("Ext.Window",{
                        modal: true,scrollable: true,items: [
                            {
                                margin: '0 0 0 10',xtype: 'tabpanel',reference: "MainTab",plain: true,resizeTabs: true,flex: 1,border: 3,items: [
                                    {
                                        title: "Messages",rootTab: true,items: [{
                                           // item
                                        }] },{    
                                        title: "Alarms",items: [{
                                                 //item,}],tbar: // need to add this tbar dynamically
                                        }] 

我曾尝试使用dockedItems使用initComponent,但对我不起作用。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)