Two ways to get this NSTableView behaviour but I do not know how to implement either
Two ways to get this NSTableView behaviour but I do not know how to implement either
- Subject: Two ways to get this NSTableView behaviour but I do not know how to implement either
- From: Gerben Wierda <email@hidden>
- Date: Sat, 12 Oct 2002 20:25:51 +0200
I would liek to present a user with a set of items which is variable in
length (and can be pretty large, as in 20-30) to be selected or
deselected.
The natural approach would be to use an NSTableView for this, but the
behaviour of NSTableView is that if one item is selected, all the
others are deselected (including ones that are out of sight) which can
be very confusing for the users.
So, I thought of two ways to handle this:
1. Make every click on a NSTableView row behave like a Command-click.
But I have not been able to catch those events (let alone change
them...). How do I do that?
2. Put checkboxes in the first column of a table view and let those
react to the clicks by changing status. To be really nice, this would
mean that the highlighting by Cocoa should not happen at all. I
implemented something earlier with progress bars in table views, where
the progress bars were drawn off screen, but I never solved the fact
that the progress bars were drawn gray because they were drawn in an
offscreen window, so I ditched them. Anyway, I haven't come up with
asolution for this one too. I noticed a message on Mac OS X Dev from
someone who said he had done this, but I never located the solution,
nor was I succesful in contacting him.
So, is there someone who can tell me how to implement either of the
two? Probably the first is easiest, but even with setAction: and
setTarget: sent to the NSTableView, the selection actions have never
arrived at my target.
Thanks in advance,
G
_______________________________________________
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.