【问题标题】:Difference between column and hBox layoutcolumn 和 hBox 布局的区别
【发布时间】:2014-09-12 12:35:08
【问题描述】:

据我所知,extJS 中的 hBox 布局似乎有点多余。

此布局将使第一个元素占 25%,第二个元素占 75%

layout: {
    type: 'hbox'
    align : 'stretch',
    pack  : 'start',
},
items: [
    {html:'a', flex:1},
    {html:'b', flex:3}
]

但我可以使用这样的列布局轻松做到这一点:

layout:'column',
items: [
{html: 'a', columnWidth: .25},
{html: 'b',columnWidth: .75}
]

hbox 布局的目的是什么?

【问题讨论】:

标签: extjs extjs4


【解决方案1】:

hbox 布局有更多配置。但是 column 布局的配置较少 和 column 布局继承自 Ext.layout.container.Auto

hbox 布局有额外的配置,例如

  1. 弹性
  2. 对齐
  3. 打包
  4. 填充 5...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-29
    • 1970-01-01
    • 1970-01-01
    • 2013-11-13
    • 2023-03-20
    • 1970-01-01
    • 1970-01-01
    • 2011-01-29
    相关资源
    最近更新 更多