Я использовал свойство barColor в компоненте ProgressBar для демонстрации производительности с цветом заливки. Теперь я перемещаю приложение на 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>
I have 3 colors in the skin class. I want to use this color based on the progressBar value. Can you please help on the same, how to display the different color by using same skin in Progressbar.