列和hBox布局之间的区别 [英] Difference between column and hBox layout

查看:110
本文介绍了列和hBox布局之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

As far as I can tell, the hBox layout in extJS seems kind of redundant.

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

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}
]

hbox 布局的目的是什么?

推荐答案

hbox 布局具有更多配置.但是布局的配置较少 和布局是从 Ext.layout.container.Auto

The hbox layout have more configs. but the column layout has less configs and column layout inherited from Ext.layout.container.Auto

hbox布局具有其他类似的配置

the hbox layout have additional configs like

  1. flex
  2. align
  3. 包装
  4. 填充 5 ...
  1. flex
  2. align
  3. pack
  4. padding 5...

这篇关于列和hBox布局之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆