Re: NSMatrix shift selection
Re: NSMatrix shift selection
- Subject: Re: NSMatrix shift selection
- From: Jeremy Dronfield <email@hidden>
- Date: Mon, 17 Jan 2005 10:21:49 +0000
On 17 Jan 2005, at 9:39 am, Stephan Burlot wrote:
Hi,
I have an NSMatrix of NSCells, and it doesnt perform shift selection
as expected*:
Lets say I have this nsmatrix:
A B C
D E F
If I click on B and shift click on F, I would expect the cells B, C,
D, E, F to be selected, but only B, C, E, F are selected, as if I was
doing a rectangular selection. Do I have to handle this myself using -
(void)setSelectionFrom: to: anchor: highlight: or is there some magic
to perform to make it work as expected?
I'm guessing that you have your matrix set up to allow selection by
rect (this is the default). Send your matrix [myMatrix
setSelectionByRect:NO], and you should get the selection behaviour you
want. (The documentation is characteristically curt about this method.
It states that passing YES allows selection of a rectangle of cells by
dragging. What it doesn't mention explicitly is that it also affects
shift-click selection behaviour.)
Hope this helps. Regards,
Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden