1

我动态创建了一个底部工具栏,但无论我为 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'
                        }
});
4

1 回答 1

2

您必须更改minHeight属性。

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

Ext.define('MyApp.view.FailureBar', {
    extend : 'Ext.Toolbar',
    alias : 'widget.failureBar',
    config : {
        docked : 'bottom',
        minHeight : '30px',
        zIndex : 1,
        cls : 'failureBar'
    }
});
于 2013-01-31T13:25:40.740 回答