ericg
ericg

Reputation: 8722

How do you customize the drop highlight for a NSTableView?

The highlighting I want is for it to draw the drop indicator between rows and to never highlight an entire row. How can I do this with the 10.5 SDK?

Since I am using the 10.5 SDK, I don't have access to -setDraggingDestinationFeedbackStyle: which is available in the 10.6 SDK.

Upvotes: 1

Views: 1031

Answers (1)

Rob Keniger
Rob Keniger

Reputation: 46020

You need to implement the ‑tableView:validateDrop:proposedRow:proposedDropOperation: table datasource method and return NSTableViewDropAbove rather than NSTableViewDropOn for the rows in question.

As per the docs, to propose a drop below the last row, row would be [aTableView numberOfRows] and operation would be NSTableViewDropAbove.

Upvotes: 2

Related Questions