Drop on NSTableView Behavior

Posted by dave-gennel on Stack Overflow See other posts from Stack Overflow or by dave-gennel
Published on 2010-02-06T11:19:12Z Indexed on 2010/05/16 22:30 UTC
Read the original article Hit count: 582

Hi,

I have an NSTableView and I have successfully implemented both tableView:validateDrop:proposedRow:proposedDropOperation: and tableView:acceptDrop:row:dropOperation:.

I don't need tableView:writeRowsWithIndexes:toPasteboard: because that's for dragging objects out of the NSTableView.

Now, the problem is that I want it to behave kind of iTunes-like. In iTunes 9.x (I don't remember it for the previous versions) you have an NSTableView (the playlist) and when you drag a file over it you get this blue focus inside the NSTableView (maybe it's the NSScrollView?) and you don't have the blue horizontal line that indicates where you're going to insert an object. So basically I would like:

  • No blue horizontal insert line between rows when hovering a file over the NSTableView.

  • The blue focus inside the NSTableView (or NSScrollView).

Any help would be greatly appreciated so thank you in advance.

© Stack Overflow or respective owner

Related posts about nstableview

Related posts about drag-and-drop