PDA

View Full Version : panel inside panel gives border: urgent



ext_fan
28 Jun 2008, 11:48 AM
Hi Im very sorry to post this basic question, but Im spending lot of time to fix this..
please help me

Im creating panel inside panel with elements its giving border for each element..please help me...I tried border, bodyBorder, frame ....no clue..

var info = new Ext.Panel({
// bodyStyle: 'padding:0px 0px 10px 0px',
border:false,
//frame:false,
items:[{
},{
}]
});

Ext.onReady(function(){
var p = new Ext.Panel({
title: 'My Panel',
collapsible:true,
renderTo: 'container',
autoWidth:true,
autoHeight:true,
items:[info]
});

});

durlabh
28 Jun 2008, 12:10 PM
Have you tried the config option
defaults: {border: false} for the main panel?

ext_fan
28 Jun 2008, 12:14 PM
but i wonder why border:false not working...


Have you tried the config option
defaults: {border: false} for the main panel?

ext_fan
28 Jun 2008, 12:18 PM
hey im sorry but for each item still it gives border

durlabh
28 Jun 2008, 12:19 PM
The config options you were specifying applied to the the panel itself, not to child elements. For child elements, you can specify any number of defaults for child elements such as:
defaults: {xtype: panel, border: false} etc.

durlabh
28 Jun 2008, 12:29 PM
Can you please paste the complete config? In my case my config would be something like this:



new Ext.Panel({
title: 'Outer Panel',
border: false,
defaults: {border: false},
items: [
{
xtype: panel,
title: 'Inner Panel without borders'
},
{
xtype: panel,
title: 'Another panel without border'
}
]
})

ext_fan
28 Jun 2008, 12:34 PM
If I try to give for each item group..then its working

if I declare for a panel like defaults: {xtype:'textfield',border: false} its not working..

ext_fan
28 Jun 2008, 12:38 PM
Please try adding items to each inner panel, you will see borders for each item

durlabh
28 Jun 2008, 2:39 PM
See, without full config, it is difficult to identify the reason. However, try this

defaults: {border: false, defaults: {border: false}}

This way, defaults should apply to 2 levels.