• 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: "Jason R. Bell" <email@hidden>
  • Date: Mon, 25 Feb 2002 21:02:33 -0500

For the benefit of those searching the archives, I've solved my problem of
selecting multiple matrix (list mode) cells in code. Given a three cell
matrix in list mode, the following will select the first and third cell:

[matrix setSelectionFrom:0 to:0 anchor:0 highlight:YES];
[matrix setSelectionFrom:2 to:2 anchor:2 highlight:YES];

I still think the docs are anything but clear on the use of the anchor
parameter.

- Jason Bell

>
> 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.

References: 
 >Re: NSMatrix - Selecting multiple cells in code (From: Jay Kuri <email@hidden>)

  • Prev by Date: Re: Document based application with that auto-new-doc behaviour
  • Next by Date: Can't find mysql.h
  • Previous by thread: Re: NSMatrix - Selecting multiple cells in code
  • Next by thread: Aborting threads
  • Index(es):
    • Date
    • Thread