Difference between column and hBox layout

余生颓废 提交于 2019-12-24 02:50:35

问题


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

  1. flex
  2. align
  3. pack
  4. padding 5...


来源:https://stackoverflow.com/questions/25808474/difference-between-column-and-hbox-layout

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!