简体   繁体   English

NSProgressIndicator中的标签/文本?

[英]Label/Text inside NSProgressIndicator?

It seems that everybody that needs some text for a NSProgressIndicator (ie showing the percentage of a download) ends up putting the text above the widget, or next to it. 似乎每个需要NSProgressIndicator文本的NSProgressIndicator (即显示下载百分比)最终都会将文本放在小部件上方或旁边。

Cannot you really show any text inside the NSProgressIndicator widget? 您真的不能在NSProgressIndicator小部件内显示任何文本吗?

An example of what I mean: 我的意思的例子:

范例图片

在IB中,只需将进度指示器嵌入自定义视图中,在该视图中添加标签,然后将进度指示器和标签都置于自定义视图中。

You can put a label where ever you want. 您可以在任何需要的地方贴标签。 The progress indicator doesn't have a text property. 进度指示器没有text属性。 So yes, you could put a label onto a progress indicator. 因此,可以在进度指示器上贴上标签。 If that would look good is an other question. 如果这看起来不错,则是另一个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM