开发者

Simple way to change bar color of Flex DownloadProgressBar component?

开发者 https://www.devze.com 2023-04-12 10:20 出处:网络
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 drawP

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

精彩评论

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