That's the focus ring. It shows when the panel is made key (because of the click) and indicates which control will respond to keyboard events, like pressing the Space key. It would presumably move around among the controls in the window as you press Tab or Shift-Tab.
If you have any text fields or the like in your panel which take focus on a click, then clicking on one of those would presumably remove the focus ring from the toolbar item and put it on the text field.
You shouldn't view this as some big problem. However, if you really want to change it, you can make another view the first responder (focused view) to make the toolbar item not have focus.
You can set the initialFirstResponder
of your window and/or your tab items. (I assume the toolbar items are switching among the tabs of a tabless tab view.)
Alternatively, you can make the window its own first responder by doing [window makeFirstResponder:nil]
. Or you can make any specific view the first responder by doing if ([view acceptsFirstResponder]) [view.window makeFirstResponder:view];
.