Re: Visually disabling some checkboxes in a NSTableView
Re: Visually disabling some checkboxes in a NSTableView
- Subject: Re: Visually disabling some checkboxes in a NSTableView
- From: Tito Ciuro <email@hidden>
- Date: Sat, 21 May 2011 10:18:32 -0700
Hi Kyle,
The method -tableView:willDisplayCell:forTableColumn:row: did the trick, thanks!
-- Tito
On May 21, 2011, at 10:02 AM, Kyle Sluder wrote:
> On Sat, May 21, 2011 at 9:19 AM, Tito Ciuro <email@hidden> wrote:
>> Hello,
>>
>> I have a table view which contains a column that displays checkboxes. I would like to disable and gray out some of the checkboxes, so I guess there are two possible ways (perhaps there's another way?):
>>
>> 1) disable the control (i.e. gray out) so that the user cannot toggle it (in one single method)
>
> There is no checkbox control. The tableview uses one checkbox cell to
> draw the entire column. So you can't just selectively disable checkbox
> instances because there is only one checkbox.
>
> Disable the cell in -tableView:willDisplayCell:forTableColumn:row:.
> Alternatively, if you're using bindings, bind the table column's
> "enabled" binding to a key that returns YES or NO as appropriate.
>
> --Kyle Sluder
_______________________________________________
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