简体   繁体   English

ExtJs 3.4:删除字段集的边框

[英]ExtJs 3.4 : Remove border of a fieldset

I have an ExtJs fieldset. 我有一个ExtJs字段集。

{
                xtype : 'fieldset',
                layout : 'hbox',

                defaults : {
                    layout : 'hbox',
                    labelAlign : 'left',
                    border : false,
                    frame : false
                },
                items : [ {
                    xtype : 'label',
                    id : 'idDrop',
                    text : '',
                    width : 120,
                    height : 25,
                    style : {
                        //background : 'yellow',
                        color : 'black',
                        textAlign: 'center',
                        border: '1px solid black',
                        'font-weight':'bold'
                    }
                }, {
                    xtype : 'label',
                    text : '',
                    id : 'idPickup',
                    width : 120,
                    height : 25,
                    style : {
                        //background : 'green',
                        color : 'black',
                        textAlign: 'center',
                        border: '1px solid black',
                        'font-weight':'bold'
                    }
                }, {
                    xtype : 'label',
                    text : '',
                    id : 'idMix',
                    width : 120,
                    height : 25,
                    style : {
                        //background : 'blue',
                        color : 'black',
                        textAlign: 'center',
                        border: '1px solid black',
                        'font-weight':'bold'
                    }
                } ]
            }

I've tried to remove the frame of this fieldset as following. 我试图删除此字段集的框架,如下所示。

defaults : {
                    layout : 'hbox',
                    labelAlign : 'left',
                    border : false,
                    frame : false
                }

But no luck. 但是没有运气。

How can I fix it ? 我该如何解决?

The properties in the defaults configuration object will be applied to all items of the fieldset, not the fieldset itself. 默认配置对象中的属性将应用于字段集的所有项目 ,而不是字段集本身。

In order to remove the border there, just set border: false on the fieldset: 为了删除边框,只需在字段集上设置border: false

{
    xtype: 'fieldset',
    border: false,
    // ...
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM