0

How to disable few NSButtons in a matrix of push buttons? Each button has a specific tag and title. To achieve this functionality the button should be bordered or borderless?

user2118335
  • 1
  • 1
  • 5

1 Answers1

0

You can create an IBOutlet for the NSMatrix.

Then :

[[self.buttonMatrix cellWithTag:1] setEnabled:NO];

Similarly for others. Instead of tag, you can also use title

EDIT, doing in loop

for (NSButtonCell *button in [self.matrix cells]) {
    if (button.tag==1) {
        [button setEnabled:NO];
    }
}
Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140