Jef Jef - 1 year ago 81
Objective-C Question

NSTableView Drop Focus Color

I have a table view and when I drop something on it, I get a blue focus inside it. Now, iTunes has the same behavior but in iTunes the color of the line is a lighter blue and the line is thicker. I have added a picture to explain it better. I want to achieve the same thing but I don't know why.

The Image:

Answer Source

I think will have to disable the focus ring and draw your own in drawRect:

From the documentation of NSView's focusRingType:

You can disable a view’s drawing of its focus ring by overriding this method to return NSFocusRingTypeNone, or by invoking setFocusRingType: with and argument of NSFocusRingTypeNone. You should only disable the default drawing of a view’s focus ring if you want it to draw its own focus ring (for example, setting the background color of the view), or if the view does not have sufficient space to display a focus ring.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download