禁用 Cocoa 中的单选按钮

发布于 2024-10-23 15:00:50 字数 176 浏览 7 评论 0原文

我有 2 个单选按钮( NSMatrix 具有 2 行和 1 列),并在头文件中将它们定义为 IBOutlet NSMatrix *temp;

现在,当我选择某个选项时,我想禁用这两个单选按钮,或者有时我想禁用第一行中的单选按钮。有关如何执行此操作的任何提示?我似乎找不到代表来做这件事。

谢谢。

I have 2 radio buttons ( NSMatrix with 2 rows and 1 column) and have defined them in the header file as
IBOutlet NSMatrix *temp;

Now when I pick a certain option, I want to disable both these radio button's or at times I want to disable the radiobutton in row 1. Any tips on how I can do this ? I can't seem to find the delgates to do this.

Thanks.

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

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

发布评论

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

评论(1

吻安 2024-10-30 15:00:50
// Disable top
[[temp cellAtRow:0 column:0] setEnabled:NO];

// Disable bottom
[[temp cellAtRow:1 column:0] setEnabled:NO];

// Disable both
[temp setEnabled:NO];
// Disable top
[[temp cellAtRow:0 column:0] setEnabled:NO];

// Disable bottom
[[temp cellAtRow:1 column:0] setEnabled:NO];

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