Re: NSTableView Drag/Drop - Which Column?
Re: NSTableView Drag/Drop - Which Column?
- Subject: Re: NSTableView Drag/Drop - Which Column?
- From: Ken Thomases <email@hidden>
- Date: Sat, 23 Jul 2016 09:08:10 -0500
On Jul 23, 2016, at 7:53 AM, Frank D. Engel, Jr. <email@hidden> wrote:
>
> Does anyone know if there is a way to determine which column of an NSTableView something being dragged is dropped onto?
>
> I have drag and drop from one table in my application onto a row of another table working, but I would like to know which column of the destination table the source item was released on so that I can have different behavior depending on which column received the object.
>
> The destination table is view-based if that makes a difference.
I don't know if this works, but you should consider making the cell views rather than the table view itself a drag destination. That will give better feedback to the user in terms of drop target highlighting.
Another thing I don't know will work: check if tableView.clickedColumn gives the right value.
If all else fails, use [tableView columnAtPoint:[tableView convertPoint:info.draggingLocation fromView:nil]].
Regards,
Ken
_______________________________________________
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