开发者

How to change color of progress bar as it progresses?

开发者 https://www.devze.com 2023-02-14 05:14 出处:网络
It would have been easy with Flex 3 using barColor but as barColor i开发者_StackOverflow中文版s no more available in Flex 4 how can I setup progress bar such that the progress fluid changes it\'s colo

It would have been easy with Flex 3 using barColor but as barColor i开发者_StackOverflow中文版s no more available in Flex 4 how can I setup progress bar such that the progress fluid changes it's color with progress.

Like starting progress with the shades of lighter green and ending at bright red.


I answered a similar question here: How to dynamically fill a progress bar in Flex/ActionScript?

In a nutshell, create a custom skin for the progress bar and fill it with a gradient (if I'm understanding you correctly.) The solution I linked is for a segmented version, but you can just replace the repeating gradient stops with single stops to get a smooth gradient.

Hope that helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消