4

Currently when I drag out a row from an NSTableView it is semi-transparent text in the row. Instead I would like to show a semi-transparent image representing this row.

How can I achive this?

Cocoanetics
  • 8,171
  • 2
  • 30
  • 57

1 Answers1

4

I suggest overriding either -[NSTableView dragImageForRowsWithIndexes:tableColumns:event:offset:] (available since OS X 10.4) or the draggingImageComponents property of NSTableCellView (available since OS X 10.7, for the new view-based table views).

Martin Winter
  • 1,370
  • 9
  • 10
  • 1
    `draggingImageComponents` is not called in my `NSTableCellView` subclass – McZonk Feb 17 '15 at 21:20
  • 1
    For the usage of -draggingImageComponents see http://stackoverflow.com/questions/17586110/custom-drag-image-with-nstableview-as-drag-source/30213507#30213507 – Jonathan Mitchell May 13 '15 at 11:32