您好我有以下弹性代码:
<mx:VBox verticalGap="0">
<mx:ProgressBar id="bar" labelPlacement="top" visible="true" verticalGap="0"
color="0x323232" label="{data.packageId}" direction="right" mode="manual" fontWeight="bold" trackHeight="10" width="400" bottom="-4"/>
<mx:ProgressBar id="subbar" visible="true" width="400" label="{data.status}" verticalGap="0"
borderColor="#c70000" direction="right" enabled="true" top="-5"
indeterminate="false" labelPlacement="bottom" maximum="100" minimum="0"
mode="manual" themeColor="#c70000" trackHeight="3"/>
</mx:VBox>
现在这两个元素位于彼此之下,我想要的是底部进度条位于顶部进度条的底部。换句话说,顶部进度条的底部和底部进度条的底部应具有相同的y值。任何帮助将不胜感激。
答案 0 :(得分:0)
使用群组而不是强制事物不重叠的VBox。不确定您使用的是哪个版本的Flex,但假设为4.0或4.5:
<s:Group>
<mx:ProgressBar id="bar" labelPlacement="top" visible="true" verticalGap="0" color="0x323232" label="{data.packageId}" direction="right" mode="manual" fontWeight="bold" trackHeight="10" width="400" bottom="-4"/>
<mx:ProgressBar id="subbar" visible="true" width="400" label="{data.status}" verticalGap="0" borderColor="#c70000" direction="right" enabled="true" top="-5" indeterminate="false" labelPlacement="bottom" maximum="100" minimum="0" mode="manual" themeColor="#c70000" trackHeight="3"/>
</s:Group>
从那里你将有更容易的定位时间。