Re: Make checkbox in table view uneditable
Re: Make checkbox in table view uneditable
- Subject: Re: Make checkbox in table view uneditable
- From: Shane Stanley <email@hidden>
- Date: Wed, 15 Sep 2010 21:48:18 +1000
- Thread-topic: Make checkbox in table view uneditable
On 15/9/10 7:11 PM, "email@hidden" <email@hidden>
wrote:
>> Thanks. I guess it boils down to the fact that a checkbox is a bad choice
>> for just showing a binary state in a table.
> Checkbox sounds fine to me for this purpose.
>
> What about the NSTableColumn enabled binding?
Yes, that works. It just looks a little odd grayed-out alongside columns of
normal (uneditable) text.
>
> If failure persists then try the NSTableView delegate method
>
> - (void)tableView:(NSTableView *)aTableView
> willDisplayCell:(id)aCellforTableColumn:(NSTableColumn *)aTableColumn
> row:(NSInteger)rowIndex
>
> Here can modify the cell as you wish to disable it for the required column.
>
> There is a lot that cannot be achieved with bindings and NSTableView.
> In these situations the delegate methods are the place to turn.
Thanks, I presumed I could do it with a delegate, but that wasn't an option
in this case. I guess I was just taken by surprise that there's no simple
way.
--
Shane Stanley <email@hidden>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden