• 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
NSTableView drag image - using the first column image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView drag image - using the first column image


  • Subject: NSTableView drag image - using the first column image
  • From: David Catmull <email@hidden>
  • Date: Fri, 15 Dec 2017 10:52:18 -0700

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

  • Follow-Ups:
    • Re: NSTableView drag image - using the first column image
      • From: Marek Hrušovský <email@hidden>
    • Re: NSTableView drag image - using the first column image
      • From: Rob Petrovec <email@hidden>
  • Prev by Date: Re: Problem with NSWorkspace.shared and uid 0
  • Next by Date: Re: NSTableView drag image - using the first column image
  • Previous by thread: Re: Problem with NSWorkspace.shared and uid 0
  • Next by thread: Re: NSTableView drag image - using the first column image
  • Index(es):
    • Date
    • Thread