问题
As far as I can tell, the hBox layout in extJS seems kind of redundant.
This layout would make the first element 25%, and the second 75%
layout: {
type: 'hbox'
align : 'stretch',
pack : 'start',
},
items: [
{html:'a', flex:1},
{html:'b', flex:3}
]
But I could just as easily do this with a column layout like so :
layout:'column',
items: [
{html: 'a', columnWidth: .25},
{html: 'b',columnWidth: .75}
]
What is the purpose of the hbox layout?
回答1:
The hbox layout have more configs. but the column layout has less configs and column layout inherited from Ext.layout.container.Auto
the hbox layout have additional configs like
- flex
- align
- pack
- padding 5...
来源:https://stackoverflow.com/questions/25808474/difference-between-column-and-hbox-layout