Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove panel borders?

I need to remove all borders. I already added border:false but it's not working.

Note that I want it to have this blue background so I'm using frame : true.

My code

        region: 'north',
        split: true,
        border: false, 
        height: 115,
        layout: 'border',
        items: [ {///Account info
            xtype: 'form',
            region: 'east',
            border: false,
            frame: true,
            //height: 100,
            width: 500, //'49%',//anchor : '50%',
            layout: 'column',

                items: [
                    { columnWidth: .5,
                      border: false, 
                      frame: true, 
                      defaults: { labelStyle: 'font-size:9px' },
                      items: [{
                            xtype: 'displayfield',
                            fieldLabel: 'Customer',
                            value: '<span style="color:blue;font-size:9px">IBM</span>'
                        }, {
                            xtype: 'displayfield',
                            fieldLabel: 'Subscription',
                            value: '<span style="color:blue;font-size:9px">On demand</span>'
                        }, {
                            xtype: 'displayfield',
                            fieldLabel: 'Remaining credits',
                            value: '<span style="color:blue;font-size:9px">23</span>'
                        }]

                    }, {
                        columnWidth: .5, 
                        border: false, 
                        frame: true,
                        margin : '0 0 0 8',
                        defaults: { labelStyle: 'font-size:9px' },
                        items: [{
                            xtype: 'displayfield',
                            fieldLabel: 'Account',
                            value: '<span style="color:blue;font-size:9px">Mike</span>'
                        }, {
                            xtype: 'displayfield',
                            fieldLabel: 'credentials',
                            value: '<span style="color:blue;font-size:9px">User</span>'
                        }]

                    }
like image 247
Armance Avatar asked Jun 22 '11 16:06

Armance


2 Answers

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;'

like image 196
JamesHalsall Avatar answered Nov 12 '22 03:11

JamesHalsall


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.

like image 5
efirat Avatar answered Nov 12 '22 03:11

efirat