0

こんにちは私は次のフレックスコードを持っています:

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

現在、これら2つの要素は互いに下に配置されています。必要なのは、下部のプログレスバーが上部のプログレスバーの下部に配置されていることです。つまり、上部のプログレスバーの下部と下部のプログレスバーの下部のy値は同じである必要があります。どんな助けでもいただければ幸いです。

4

1 に答える 1

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>

そこから、ポジショニングをより簡単に行うことができます。

于 2012-06-05T09:06:20.117 に答える