Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
プッシュボタンのマトリックスでいくつかの NSButtons を無効にする方法は? 各ボタンには、特定のタグとタイトルがあります。この機能を実現するには、ボタンを縁取りまたは縁なしにする必要がありますか?
IBOutletのを作成できますNSMatrix。
IBOutlet
NSMatrix
それで :
[[self.buttonMatrix cellWithTag:1] setEnabled:NO];
他の人についても同様です。の代わりにtag、使用することもできますtitle
tag
title
編集、ループで行う
for (NSButtonCell *button in [self.matrix cells]) { if (button.tag==1) { [button setEnabled:NO]; } }