PDA

View Full Version : layout question



edwardking
8 Jul 2010, 7:11 PM
I use following code,like follows:


northPanel={
title:'North Panel',
region:'north',
margins:'0 0 0 0',
cmargins:'0 0 0 0',
width:175,
minSize:100,
maxSize:250
}
var container=new Ext.Viewport({
layout:'border',
defaults:{
collapsible:true,
split:true,
bodyStyle:'padding:15px'
},
items:[northPanel,southPanel,westPanel,eastPanel,centerPanel]
});


I have three question:
1. What meaning of cmargins?
2. I want to hide northPanel title,so I get rid of title,but I still can see a title bar,I want to hide the title bar too,how to do it?


northPanel={
region:'north',
margins:'0 0 0 0',
cmargins:'0 0 0 0',
width:175,
minSize:100,
maxSize:250
}

3. I find there are intervals among northPanel,southPanel,westPanel,eastPanel,centerPanel. I want to get rid of these intervals,how to do it?

Thanks

11 Jul 2010, 8:53 AM
1 cmargins =collapsed margins. The API has a definition on this.

2 you might want to set the collapseMode to mini

3 what do you mean "intervals" ?

edwardking
11 Jul 2010, 5:02 PM
1 cmargins =collapsed margins. The API has a definition on this.

2 you might want to set the collapseMode to mini

3 what do you mean "intervals" ?

How to set the collapseMode to mini, Which code can I use? An example is better.
Intervals means there are blank rows and blank cols among northPanel,southPanel,westPanel,eastPanel,centerPanel,I want to get rid of these blank rows and blank cols.

Thanks

Condor
11 Jul 2010, 10:06 PM
2. I think you are looking for header:false. But if you are not going to use the header, then you probably also don't need a panel and you could replace it with an xtype:'container' or even an xtype:'box'.

3. Did you configure all your regions with margins:'0 0 0 0'?