سؤال

I have a custom control that I use that has some (NSTextField *) NSCells in it. I have attempted at the cell level to disable all cells from usage, yet my loop that goes through all the cells seems to do nothing.

[myCell setEnabled:NO];

compile and run...

cell is still clickable and editable.

My final goal is to ofcourse disable only a few during runtime... but I cant even disable all of them during setup.

هل كانت مفيدة؟

المحلول 2

the issue was with a super method that was toggling everything. I then had to deal with both the keyDown actions and keyUp actions that were also enabling entry. Also had to deal with the NSStepper ability to circumvent the fields not being enabled.

نصائح أخرى

Try calling setEditable:NO on them as well.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top