我在 ProgressBar 组件中使用了属性“ barColor”来显示填充颜色的性能。现在我将应用程序移至 Flex 4。因此,此属性在 Flex 4 中不可用。您能否请任何知道该barColor
属性替代方案的人。Spark 不支持此属性。
<mx:ProgressBar xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="100%" x="0" y="0"
height="20"
label=""
labelPlacement="center"
minimum="0"
id="iops"
maximum="1000"
mode="manual"
barSkin="{progressSkin}">
和ProgressSkin类:-
<fx:Metadata>
[HostComponent("progressBarComponent")]
</fx:Metadata>
<fx:Script>
<![CDATA[
override protected function initializationComplete():void {
useChromeColor = true;
super.initializationComplete();
}
]]>
</fx:Script>
<s:Rect top="0" right="0" left="0" bottom="0" id="green" includeInLayout="{hostComponent.color==0x94CF65}">
<s:fill >
<s:SolidColor color="0x94CF65" />
</s:fill>
</s:Rect>
<s:Rect top="0" right="0" left="0" bottom="0" includeInLayout="{hostComponent.color==0xFFDE53}">
<s:fill>
<s:SolidColor color="0xFFDE53" />
</s:fill>
</s:Rect>
<s:Rect top="0" right="0" left="0" bottom="0" includeInLayout="{hostComponent.color==0xFF9428}">
<s:fill>
<s:SolidColor color="0xFF9428" />
</s:fill>
</s:Rect>
我在皮肤类中有 3 种颜色。我想根据 progressBar 值使用这种颜色。您能否提供相同的帮助,如何通过在进度栏中使用相同的皮肤来显示不同的颜色。