Re: Setting a discontinuous selection in NSMatrix
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