如何在ExtJS中为Container添加边框

Dul*_*eep 3 extjs extjs3

容器看起来如下所示.我想为此容器添加边框,如文本框边框,请帮助为Container添加边框.

MyContainer13Ui = Ext.extend(Ext.Container, {
    flex: 1,
    width: 500,
    height: 22,
    activeItem: 0,
    id: 'url',
    initComponent: function() {
        MyContainer13Ui.superclass.initComponent.call(this);
    }
});
Run Code Online (Sandbox Code Playgroud)

Sas*_*ato 6

如果您不能在配置中设置border:true,请尝试以下操作:

 MyContainer13Ui = Ext.extend(Ext.Container, {
    flex: 1,
    width: 500,
    height: 22,
    border: 1,
    style: {
       borderColor: 'black',
       borderStyle: 'solid'
    },
    activeItem: 0,
    id: 'url',
    initComponent: function() {
        MyContainer13Ui.superclass.initComponent.call(this);
    }
});
Run Code Online (Sandbox Code Playgroud)