在 FireMonkey 中使用进度条的不确定样式
FireMonkey中的TProgressBar是否支持不确定样式?如果是这样,你如何使用不确定风格?
在 Mac OS 和较新版本的 Windows 上,有两种样式的进度条。一是确定的进度条,您可以通过它知道最小值、最大值和当前值。在这种情况下,进度条通常用于显示特定任务的完成百分比。 Firemonkey 通过利用 TProgressBar 的 Min、Max 和 Value 属性来支持此方法。
另一种样式的进度条是不确定进度条。当无法确定值时使用不确定样式,但可以向用户指示任务正在进行中。它通常由带有滑动对角线穿过的进度条表示。
如果不支持,您对利用 FireMonkey 以跨平台方式实现此功能有什么建议吗?
编辑
我知道 TAniIndicator,但这在这种情况下不合适。我已经向用户展示了一个大型任务的进度条,该任务被分解为多个较小的任务。标题会发生变化并显示任务每个部分的进度。有些子任务是不确定的,所以在那些时候,我想只使用不确定的风格。我不想在进度条和微调器之间切换。这太分散注意力了。
这是我在很多程序中看到的常见实现,并且可以在每个平台上本地实现。
Is the indeterminate style supported by TProgressBar in FireMonkey? If so, how do you use the indeterminate style?
On Mac OS, and newer versions of Windows, there are two styles of progress bars. One is the determinate progress bar whereby you know the minimum, maximum, and current value. In this case, the progress bar is generally used to show the percentage completion of a particular task. Firemonkey supports this method by utilizing a TProgressBar's Min, Max, and Value properties.
The other style of progress bar is the indeterminate progress bar. The indeterminate style is used when the values are unable to be determined, but to indicate to the user that a task is in progress. It is generally represented by a progress bar with sliding diagonal lines going through it.
If it's not supported, do you have any suggestions for implementing this in a cross platform way, utilizing FireMonkey?
Edit
I know about TAniIndicator, but that's not appropriate in this case. I'm already showing the user a progress bar for a large task that is broken down into smaller tasks. The caption changes and shows the progress for each part of the task. Some of the sub tasks are indeterminate, so at those times, I'd like to just use the indeterminate style. I don't want to switch between a progress bar and a spinner. It would be too distracting.
This is a common implementation that I've seen in a lot of programs and is possible on each platform natively.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您设置 ProgressBar1.Value = TProgressBar1.Max,您会看到其中有一个移动部件。
我想它可以在样式编辑器中自定义。
不是进度条,而是给用户反馈的另一个组件:TAniIndicator
If you make ProgressBar1.Value = TProgressBar1.Max you see a moving part in it.
I guess it is customizable in the Style Editor.
Not a progressbar but another component giving the user feedback: TAniIndicator
在 firemonkey 中将 .value 设置为 .max 时没有移动动画,条形图只是保持绿色。
There is no moving animation when setting .value to .max in firemonkey, the bar just stays green.