开发者

How to change color of progress bar as it progresses?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜