Re: Make checkbox in table view uneditable
Re: Make checkbox in table view uneditable
- Subject: Re: Make checkbox in table view uneditable
- From: "email@hidden" <email@hidden>
- Date: Wed, 15 Sep 2010 10:11:42 +0100
On 15 Sep 2010, at 06:09, Shane Stanley wrote:
> On 15/9/10 12:29 PM, "Keary Suska" <email@hidden> wrote:
>
>> Checkboxes aren't edit controls, they are buttons, and to my knowledge don't
>> even have an "editable" property (even though the table column has such a
>> binding). To prevent changing a button state (without significant subclassing)
>> you must disable it.
>
> 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?
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.
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com_______________________________________________
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