[Q] Disabling an NSTableView
[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.