Re: NSTableView drag image - using the first column image
Re: NSTableView drag image - using the first column image
- Subject: Re: NSTableView drag image - using the first column image
- From: Rob Petrovec <email@hidden>
- Date: Sun, 17 Dec 2017 17:13:38 -0700
You probably want NSTableView
-dragImageForRowsWithIndexes:tableColumns:event:offset:
—Rob
> On Dec 15, 2017, at 10:52 AM, David Catmull <email@hidden> wrote:
>
> In my table view, when you drag an item, the drag image it uses comes from
> the column cell where the drag started, rather than using the cell from the
> first column where I have the icon and name. How do I make it use the first
> column?
>
> I'm looking at Apple's TableViewPlayground as an example, and the outline
> view there works like I want, and I can't see what the key difference is.
>
> I'm tempted to try to fix it in tableView:updateDraggingItemsForDrag: but
> the Apple sample only uses that to update the image for external drags. For
> local drags, that method is essentially not used. If I comment that method
> out, the first-column-image behavior I want still works in the sample.
>
> I have a simple example at https://github.com/Uncommon/TableTest - notice
> that dragging from different columns yields different drag images even
> though the data in the drag is the same.
> _______________________________________________
>
> 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
_______________________________________________
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