• 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: Setting a discontinuous selection in NSMatrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting a discontinuous selection in NSMatrix


  • Subject: Re: Setting a discontinuous selection in NSMatrix
  • From: Sherm Pendley <email@hidden>
  • Date: Tue, 18 Jan 2011 22:01:45 -0500

On Tue, Jan 18, 2011 at 9:45 PM, James Bucanek <email@hidden> wrote:
>
> I have an NSMatrix view that's driving me nuts. It's mode is set to
> NSListModeMatrix, which allows the user to click, shift+click,
> command+click, and drag to create arbitrary selections of cells.
>
> I can get the set of selected cells by sending -selectedCells.
>
> However, I can find no way of programmatically setting an arbitrary
> selection. Everything I've tried (-selectCell:, -selectCellAtRow:column:,
> even -[NSCell setState:]), either doesn't update the selection or only
> selects the last cell.
>
> How can I set an arbitrary selection programmatically?

Try -setSelectionFrom:to:anchor:highlight:

sherm--

--
Cocoa programming in Perl:
http://camelbones.sourceforge.net
_______________________________________________

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

  • Follow-Ups:
    • Re: Setting a discontinuous selection in NSMatrix
      • From: James Bucanek <email@hidden>
References: 
 >Setting a discontinuous selection in NSMatrix (From: James Bucanek <email@hidden>)

  • Prev by Date: Setting a discontinuous selection in NSMatrix
  • Next by Date: Re: Setting a discontinuous selection in NSMatrix
  • Previous by thread: Setting a discontinuous selection in NSMatrix
  • Next by thread: Re: Setting a discontinuous selection in NSMatrix
  • Index(es):
    • Date
    • Thread