PDA

View Full Version : Split regions



steffenk
18 Feb 2011, 3:41 AM
Will it possible to change regions to split regions on the fly? In Ext3 it wasn't, so you have to create it as splitregion and use some magic to hide it again.

evant
18 Feb 2011, 3:54 AM
The border layout is just a combo of vbox/hbox layouts. In short, yes!

steffenk
18 Feb 2011, 4:26 AM
sounds great. Does this means that we don't have regions anymore?

evant
18 Feb 2011, 5:15 PM
Border layout still exists, but you don't need to use it. It's just there for convenience.

Animal
19 Feb 2011, 11:47 AM
No, you cannot change the border layout's regions on the fly.

It analyzes what regions you configure it with and creates the minimum set of box layouts to do that.

So if you configure it with north, center and south, it will just create a VBOX layout with your three items in.

So you cannot then add a west or east.

Likewise if you configure it with west, center and east, it will create an HBOX layout.

If you have (north or south) and (east or west) then it will create a VBOX layout, and the center will be a shadow Container configured as an HBOX layout.

Basically, it's only there to support legacy apps which already use it. The Box layouts are more powerful if you use them directly.

apfister
19 Feb 2011, 4:02 PM
The Box layouts are more powerful if you use them directly.

Do you mean you can/should use Box layouts instead of Border layouts? If so, can you provide a simple example of this? Thanks!

evant
19 Feb 2011, 4:28 PM
Look at examples/border.html

apfister
19 Feb 2011, 4:32 PM
if i'm looking at the right example, all of those layout config options use "border" and have regions associated with them. so i take it that's still the recommended approach...?

Animal
19 Feb 2011, 5:59 PM
{
layout: {
type: 'hbox',
align: 'stretch'
}
}


Box layout. Not border.