开发者

Simple way to change bar color of Flex DownloadProgressBar component?

Is there a simple way to change the开发者_开发知识库 bar color of the default download progress bar by extending the DownloadProgressBar component besides implementing our own progress bar?


Since drawProgressBar method, where progress bar drawing is performed, is private, you cannot change the colors there. But you can write your own class extending Sprite and implementing IPreloaderDisplay and copy all the code from DownloadProgressBar class. And then just set your own colors in drawProgressBar method. And don't forget to set your own preloader as a preloader property of Application.


Try setting preloaderChromeColor in the Application tag. If you want more control, you'll need to create a custom preloader which extends SparkDownloadProgressBar and set backgroundColor in there.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜