• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Visually disabling some checkboxes in a NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Visually disabling some checkboxes in a NSTableView


  • Subject: Re: Visually disabling some checkboxes in a NSTableView
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 21 May 2011 10:02:29 -0700

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

  • Follow-Ups:
    • Re: Visually disabling some checkboxes in a NSTableView
      • From: Tito Ciuro <email@hidden>
References: 
 >Visually disabling some checkboxes in a NSTableView (From: Tito Ciuro <email@hidden>)

  • Prev by Date: Visually disabling some checkboxes in a NSTableView
  • Next by Date: Re: Visually disabling some checkboxes in a NSTableView
  • Previous by thread: Visually disabling some checkboxes in a NSTableView
  • Next by thread: Re: Visually disabling some checkboxes in a NSTableView
  • Index(es):
    • Date
    • Thread