How do I remove panel borders?

霸气de小男生 提交于 2019-12-05 00:05:39

Your problem is that you have frame: true configured. Set it to false and it will remove the blue border.

false by default to render with plain 1px square borders. true to render with 9 elements, complete with custom rounded corners (also see Ext.Element.boxWrap).

Also, the blue background is nothing to do with the frame config option

EDIT: When removing frame: true you need to add a config option to style the background color...

bodyStyle: 'background-color:#dfe8f5;'

EDIT 2: Like Elgin mentioned in the comments, it's probably better to use a transparent background color to make theme changes easier...

bodyStyle: 'background-color: transparent;'

Here is my solution for ExtJs 4.0.7 column model

{
layout: 'column',
border:0,
defaults:{
    columnWidth:0.5
   ,layout:'anchor'
   ,border:0
},
items: [{ 
    // LEFT COLUMN
    defaults:{anchor:'100%'},
    items: [
        new Prg.checkBox({
            fieldLabel: 'Aktif mi?',
            name: 'activeFlag',
            labelWidth: 60,
            checked: (Ext.isEmpty(this.record)?false:this.record.get('activeFlag'))
        }),
        new Prg.idCombo({
            fieldLabel : 'Dil',
            labelWidth: 60,
            emptyText : 'Dili seçiniz...',
            id: 'langId',
            name : 'langId',
            store : this.ds_language
        })]
}

Here is layout:column model is used to make shape of form readable. There was borders on the each column. After long time searching border:0 works for me.

For ExtJS 3.x remove "frame: true" and set "bodyCssClass: 'x-panel-mc'".

Remove frame : true option or put frame : false there.

For anyone who might have this issue I solved it by adding the following to my panel. (ExtJS 4.x)

bodyCls: 'x-panel-body-default-framed'

As mentioned above, if you have frame:true you get the rounded corners.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!