PDA

View Full Version : remove borders from viewport



realtebo2
4 Aug 2009, 6:21 AM
I'm starting just now learning ext 3 so i bought the MEAP edition of 'ExtJS in action''

I've a blank body on an html file

I want to create a simil-blog layout using a viewport with nord, center and east sections.

Every thing works ok, but i'm not able to remove the borders from regions... how to?
I used margins : '0' in ALL of regions, but nothing.

help me please

Animal
4 Aug 2009, 6:23 AM
regions do not have borders.

Panels do.

If you do not need to use a Panel, then don't use a Panel.

realtebo2
4 Aug 2009, 6:56 AM
I'm actually using this code:




Ext.onReady( function () {
new Ext.Viewport ({
layout : 'border',
shadow : 'false',
items : [
{
region : 'north',
height : 100,
margins : {top:0, right:0, bottom: 0, left:0}
} , {
region : 'center',
margins : {top:0, right:0, bottom:0, left:0}
} , {
region : 'east',
width : 120,
margins : {top:0, right:0, bottom:0, left:0}
}
]

})
});


I want to thank you because your reply helped me. I opened API docs and looked for Panel.border.

So i substituted margins { ... } with border: false and everything looks right. Thanks

Animal
4 Aug 2009, 6:58 AM
Yes.

But as I said, why use Panels if you don't need to?

You are not using any Panel specific capabilites there, so why are you using Panels?

cedamorim
4 Aug 2009, 8:41 AM
Ext.onReady( function () {
new Ext.Viewport ({
layout : 'border',
shadow : 'false',
defaults :{ border : false},
items : [
{
region : 'north',
height : 100,
margins : {top:0, right:0, bottom: 0, left:0}
} , {
region : 'center',
margins : {top:0, right:0, bottom:0, left:0}
} , {
region : 'east',
width : 120,
margins : {top:0, right:0, bottom:0, left:0}
}
]

})
});

Animal
4 Aug 2009, 11:36 AM
No, what I mean is



Ext.onReady( function () {
new Ext.Viewport ({
layout : 'border',
shadow : 'false',
defaultType : 'box',
items : [
{
region : 'north',
height : 100
} , {
region : 'center',
} , {
region : 'east',
width : 120
}
]

})
});