【问题标题】:Sencha Touch toolbar heightSencha Touch 工具栏高度
【发布时间】:2013-01-31 21:25:40
【问题描述】:

我动态创建了一个底部工具栏,但无论我为 height 属性赋予的值如何,它都有其默认高度。我尝试了百分比、像素、简单的数字,但没有任何效果。

myComponent.add({
                        xtype:'toolbar',

                        autoDestroy:true,
                        docked:'bottom',
                        bottom:0,

                        width:'100%',
                        height:'5px',

                        margin:'0 0 0 0',
                        padding:'0 0 0 0',

                        layout:{
                            pack:'middle',
                            align:'middle'
                        }
});

【问题讨论】:

  • 我也尝试了 maxHeight 配置,但它不起作用

标签: sencha-touch-2 toolbar sencha-touch-theming


【解决方案1】:

您必须更改minHeight 属性。

我的代码中的一个工作示例:

Ext.define('MyApp.view.FailureBar', {
    extend : 'Ext.Toolbar',
    alias : 'widget.failureBar',
    config : {
        docked : 'bottom',
        minHeight : '30px',
        zIndex : 1,
        cls : 'failureBar'
    }
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多