• 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
[Q] Disabling an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] Disabling an NSTableView


  • Subject: [Q] Disabling an NSTableView
  • From: Mark de Jong <email@hidden>
  • Date: Mon, 15 Jul 2002 12:27:31 -0700

I searched the archives for information telling me how to disable an NSTableView. What I found was several discussions including this question, but no answers.

I have a preference window that has two radio buttons and a table view. If one radio button is selected, the data in the table view should not be selectable or editable at all. If the other radio button is selected, then the table view becomes active and its data can be selected and edited.

When I send "setEnabled:NO" to my table, the table's visual appearance does not change and I can still select and edit all the items in the table. I would expect its appearance and behavior to change, similar to other controls.

Question 1: why is this so?
Question 2: how do I get the desired effect, mentioned above?

One possible workaround that comes to mind is to set both the table's delegate and datasource to nil and send "reloadData" to deactivate it. And then reconnect the delegate and datasource when re-activating it. This seems kind of gross, though ... and still will not achieve the visual "dimmed" or "grayed-out" appearance.

Thanks, in advance, for any clues and suggestions you can offer,

-- Mark
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: [Q] Disabling an NSTableView
      • From: Dan Wood <email@hidden>
  • Prev by Date: Comunications between clasess
  • Next by Date: Comunications between classes
  • Previous by thread: Comunications between clasess
  • Next by thread: Re: [Q] Disabling an NSTableView
  • Index(es):
    • Date
    • Thread