【问题标题】:Sencha Touch TabBar add button on the left side of tabsSencha Touch TabBar 在标签左侧添加按钮
【发布时间】:2011-07-05 23:45:50
【问题描述】:

我正在学习一些煎茶触摸教程,但我不知道如何在 TabPanel 视图中的选项卡左侧添加一个按钮。默认情况下,选项卡右侧会添加一个按钮。我尝试更改对齐和布局设置,但似乎没有任何效果。这是我正在尝试修改的简单代码

Ext.setup({

onReady: function() {
    new Ext.TabPanel({
        fullscreen: true,

        tabBar:{
            items:[{
                xtype: 'button',
                ui: 'round', 
                text: 'Round'
            }]
        },

        items: [{
            title: 'Tab 1',
            html: '1',

        }, {
            title: 'Tab 2',
            html: '2',

        }, {
            title: 'Tab 3',
            html: '3',

        }]
    });
}

});

【问题讨论】:

    标签: sencha-touch tabbar tabpanel


    【解决方案1】:

    试试这个:

    tabBar:{
       dockedItems:[{
           xtype: 'button',
           ui: 'round', 
           text: 'Round',
           dock: 'left'
       }]
    },
    

    【讨论】:

    • 好吧,我只花了两个小时就找到了这个答案......非常感谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多