• 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
Re: NSMatrix - Selecting multiple cells in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSMatrix - Selecting multiple cells in code
      • From: "Jason R. Bell" <email@hidden>
References: 
 >NSMatrix - Selecting multiple cells in code (From: "Jason R. Bell" <email@hidden>)

  • Prev by Date: NSMatrix - Selecting multiple cells in code
  • Next by Date: Aborting threads
  • Previous by thread: NSMatrix - Selecting multiple cells in code
  • Next by thread: Re: NSMatrix - Selecting multiple cells in code
  • Index(es):
    • Date
    • Thread