Re: NSMatrix - Selecting multiple cells in code
Re: NSMatrix - Selecting multiple cells in code
- Subject: Re: NSMatrix - Selecting multiple cells in code
- From: Jay Kuri <email@hidden>
- Date: Sun, 24 Feb 2002 10:35:08 -0600
Admittedly, I'm a bit new to cocoa, but I think what you need to do is
use -setMode to change the mode of the Matix.
If you look at the constants section of the NSMatrix documentation,
you'll see the 4 modes you can set. It sounds like the mode is by
default 'NSRadioModeMatrix' which only allows one cell to be selected at
a time (unselecting the last selected cell when the new cell is
selected). I think what you want is 'NSListModeMatrix'.
Jay
On Sunday, February 24, 2002, at 08:27 AM, Jason R. Bell wrote:
I thought this would be an easy one but it has been over two days with
no
luck. I have an NSMatrix of button cells in list mode. When running,
it is
possible for the user to select cells "finder style" (click to select
one,
drag select or shift-click for ranges, and command-click for multiple
individual cells) and it works fine. However, I want to select multiple
cells in code. This has to be possible and should be simple but all of
the
selectCell methods unselect the previously selected cell and
setSelectionFrom:to:anchor:highlight looks like another option but I
can't
see how it can be used to select something other than a continuous
range.
Here is the simplest possible case: NSMatrix of buttons in list mode
with
three cells. How do you select the first and third in code?
This question appears to have been asked a long time ago on the list but
with no correct response. Please help.
Jason Bell
_______________________________________________
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.
_______________________________________________
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.