Remove Blue NSButton Shadow

Always (programmatically or via IB) I get this blue shadow on the first button given:

blue shadow

I want to get rid of him .. how?

+5
source share
2 answers

This is called the focus ring, and it visually indicates which view is the first responder for key events.

If you do not want it to be displayed, you can use a method -[NSView setFocusRingType:]with a constant NSFocusRingTypeNone. It is also customizable in Interface Builder.

+12
source

This is due to the way the computer accesses windows from the keyboard. The highlight notifies the user that this is the current focused control.

[someOtherControl becomeFirstResponder];

: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/TextEditing/Tasks/SetFocus.html

+1

All Articles