Re: Make checkbox in table view uneditable
Re: Make checkbox in table view uneditable
- Subject: Re: Make checkbox in table view uneditable
- From: Michael Watson <email@hidden>
- Date: Wed, 15 Sep 2010 02:45:27 -0700
On 15 Sep, 2010, at 02:11, email@hidden wrote:
> 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.
>
If he means that the checkbox would never be toggleable under any circumstances, and that it's purely to *indicate* state and not *control* state, that's the wrong use for a checkbox button. A custom indicator that doesn't look like it could be enabled and toggled under some_unknown_circumstance would be a better idea.
--
michael
> 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
_______________________________________________
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