PDA

View Full Version : Does hbox layout replace the RowFit Layout?



brookd
15 Jul 2009, 7:13 AM
Does anyone know if the new hbox layout in Ext3.0 can replace usage of Ext.ux.layout.RowFitLayout from http://extjs.com/forum/showthread.php?t=17116 ?

Animal
15 Jul 2009, 7:19 AM
Yes.. well vbox layout does. It's super flexible.

It lays out in boxes going down the screen.

Takes a bit of playing around to get used to the configs, but it is VERY good.

Animal
15 Jul 2009, 7:19 AM
hbox takes the place of column layout.

Condor
15 Jul 2009, 7:27 AM
While hbox/column and vbox/row-fit can be interchanged in most cases there is still a fundamental difference:
hbox and vbox uses absolute positioning, but column layout is floating and row-fit is static.

Absolute positioning can sometimes affect sizing in legacy layouts.

Also, column layout can span multiple rows which hbox can't.

Animal
15 Jul 2009, 8:05 AM
Also, column layout can span multiple rows which hbox can't.

It depends if you nest the rows in columns or columns in rows.

If you have an hbox layout with 3 boxes (3 columns), the first one could be a Container with a vbox layout with two boxes (2 rows). The next two might just be Panels.

So you have row spanning. I think with a bit of fiddling you can do most things.

Condor
15 Jul 2009, 10:30 AM
Yes, but with column layout it's easier, e.g.

layout: 'column',
defaults: {
columnWidth: .5
},
items: [{
title: 'First row - left'
},{
title: 'First row - right'
},{
title: 'Second row - left'
},{
title: 'Second row - right'
}]