2012-06-05 2 views
0

안녕하세요 난 다음 플렉스 코드가 : 지금이 두 요소가 서로 아래에 위치하는분들께 2 ProgressBar를 겹쳐 서로

<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

오버랩되지 않도록 강제하는 VBox 대신 그룹을 사용하십시오. 사용중인 플렉스 버전을 잘 모르지만 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> 

거기에서 위치 지정을하면 훨씬 쉽게 시간을 가질 수 있습니다.

관련 문제