如何自定义进度条 [英] How to customize a progress bar

查看:102
本文介绍了如何自定义进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个与值相关的颜色编码的进度条。例如,从0到35,进度条应为红色,高于35,绿色。知道如何去做吗?

I was trying to creating a progress bar that was color coded in relation to the value. For example, from 0-35, the progress bar should be red-colored and above 35, green colored. Any idea how I can go about doing it?

推荐答案

请阅读这篇文章:进度条 [ ^ ]。在那里你会发现很多关于使用进度条的有用信息。



这是关于CP KB的非常有趣的文章:自定义ProgressBar控件 [ ^ ]
Please, read this article: Progress bars[^]. There you'll find many useful information about using progress bars.

Here is very interesting article on CP KB: Custom ProgressBar Control[^]


根据35:65的比例将进度条分为两个,并使其看起来像UI中的一个进度条。然后,编写代码以红色显示第一部分的进度,并在第一部分完成时,以绿色显示第二部分的进度。计算第一和第二部分的进度。



谢谢,
Divide progress bar into two based on 35:65 ratio and make it look like one progress bar in UI. Then, write your code to show progress in the first part in red color and on completion of the first part, show progress in 2nd part in green color. Calculate progress considering first and 2nd part as one.

Thanks,


这篇关于如何自定义进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆