如何在进度条上显示刻度线? [英] How do I display tick marks on a Progress Bar?

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

问题描述

我正在下载一组文件,我想在进度条中显示进度.通过将进度条的最大值设置为所有文件的总大小,并将当前位置设置为到目前为止下载的大小,可以很简单地显示整体进度.

I'm downloading a collection of files, and I'd like to display progress in a progress bar. It's simple to display overall progress by setting the maximum value of the progress bar to the total size of all the files, and by setting the current position to the size downloaded so far.

我想要做的是将进度条分成多个部分,每个部分代表集合中的一个不同文件.

What I'd like to do is separate the progress bar into segments, with each section representing a different file in the collection.

这可能吗?我该怎么做?

Is this possible? How would I do it?

推荐答案

如果你知道要下载的文件的总大小,并且你知道到目前为止下载的文件的总大小,那么你只需设置 .Maximum到文件的总大小,而 .Position 到到目前为止下载的总数.无需担心文件之间的大小如何分配.

If you know the total size of the files to be downloaded, and you know the total size of the files downloaded so far, then you can just set .Maximum to the total size of the files, and .Position to the total downloaded so far. No need to worry about how the size is split between the files.

或者你的意思是你想根据每个文件的大小在进度条上打勾?

Or did you mean that you want tick marks on the progress bar according to the size of each file?

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

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