Ensuring no selection in a table view
Ensuring no selection in a table view
- Subject: Ensuring no selection in a table view
- From: John Brownie <email@hidden>
- Date: Wed, 29 Dec 2010 16:05:40 +1000
I'm new to Cocoa, coming from Carbon programming (and, before that, Unix).
I am creating a utility-type window which shows information about the
current document, and one of the pieces is a table view listing one or
more items. The user can't do anything with this information apart from
look at it, so I want it to have no selection, but be able to scroll up
and down so that all the rows can be seen. The problem is that it always
shows the first row selected.
In IB, I have:
For the Scroll View: no focus ring
For the Table View: no column sizing, reordering or headers, only Empty
checked in the selection part, State is not enabled, not continuous, and
refuses first responder
For the Table Column: not resizable, editable, or hidden
For the Text Field Cell: everything off except Refuses First Responder
In the code, I ensure that the array controller does not avoid empty
selection, and that the table view allows an empty selection. I also
call deselectAll: when I load the array.
The list appears, I can deselect the row manually (by clicking in an
empty row or command-clicking the selected row), but always selects the
first row when the window appears.
What am I doing wrong or not doing? Is there something about the window
appearing that I need to override?
John
--
John Brownie, email@hidden or email@hidden
Summer Institute of Linguistics | Mussau-Emira language, Mussau Is.
Ukarumpa, Eastern Highlands Province | New Ireland Province
Papua New Guinea | Papua New Guinea
_______________________________________________
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