简体   繁体   English

adobe flex 如何去除 BOX、VBOX、HBOX 之间的空间

[英]adobe flex how to remove space between BOX, VBOX, HBOX

<mx:VBox horizontalGap="0" verticalGap="0" height="84" width="164" verticalAlign="middle" styleName="amount">
    <s:Label text="text" width="100%" textAlign="center"/>
    <s:Label text="text" width="100%" textAlign="center"/>
</mx:VBox>
<mx:Box width="1" height="84" borderStyle="solid">

</mx:Box>
<mx:VBox horizontalGap="0" verticalGap="0" height="84" width="144" verticalAlign="middle" styleName="amount">
    <s:Label text="text" width="100%" textAlign="center"/>
    <s:Label text="text" width="100%" textAlign="center"/>
</mx:VBox>

I've tried to use horizontalGap and the VerticalGap setted to 0, but that doesn't work, how to remove the gap between mx boxes?我试过使用horizo​​ntalGap 并将VerticalGap 设置为0,但这不起作用,如何消除mx 框之间的间隙?

The "gap" properties specify how much of a gap should be applied when laying out the Box's children. “gap”属性指定在布置 Box 的子项时应该应用多少间隙。

For example, your code below where the gap properties are 0, means that this VBox should layout it's child elements (the labels) with no vertical gap (the horizontal gap in this case is useless, since we're talking about a VBox ).例如,下面的代码间隙属性为 0,这意味着该VBox应该布局它的子元素(标签),没有垂直间隙(在这种情况下水平间隙是无用的,因为我们谈论的是VBox )。

<mx:VBox horizontalGap="0" verticalGap="0" height="84" width="164" verticalAlign="middle" styleName="amount">
    <s:Label text="text" width="100%" textAlign="center"/>
    <s:Label text="text" width="100%" textAlign="center"/>
</mx:VBox>

So what is the container that contains all of your boxes above?那么包含上面所有盒子的容器是什么? If that container is a VBox , set the verticalGap of that parent container object to 0. If it's an HBox , set it's horizontalGap to 0.如果该容器是VBox ,则将该父容器对象的verticalGap设置为 0。如果它是HBox ,则将它的horizontalGap设置为 0。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM