NSArrayController 绑定:抑制“无选择”

发布于 2024-08-29 10:29:53 字数 146 浏览 1 评论 0原文

我有一个绑定到 ArrayController 的文本字段。控制器键是“选择”,因为我从 NSTableView 中选择项目。但是,当表中没有项目时,文本字段显示灰色文本“无选择”。

如何抑制此文本并只有一个空文本字段? 或者如何将“无选择”文本更改为其他内容?

I have a texfield bound to an ArrayController. The controller key is "selection" because I select items from a NSTableView. But when there are no items in the table the textfield shows the gray text "no selection".

How can I suppress this text and have just an empty textfield?
Or how can I change the "No selection" text to something else?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何以笙箫默 2024-09-05 10:29:53

在 Interface Builder 的绑定检查器中,将无选择占位符设置为空格字符。

In the bindings inspector in Interface Builder, set the No Selection Placeholder to be a space character.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文