开发者

remove blue shadow of NSButton

Always (programmatically or via 开发者_开发百科IB) i get this blue shadow on the first set button:

remove blue shadow of NSButton

I want to get rid of it.. how?


That's called the focus ring, and it's to visually indicate which view is the first responder for key events.

If you don't want it to show up, you can use the -[NSView setFocusRingType:] method with the NSFocusRingTypeNone constant. This is also settable in Interface Builder.


This is to-do with the how the computer accesses windows via the keyboard. The highlight is notifying the user that this is the currently focused control.

To remove it from that control simply

[someOtherControl becomeFirstResponder];

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜