I use the - addSubview:
method to add an subview with outline view.
But I found strange that if I programmatically select an object of this outline view, the selection highlighting was not blue:
However, as long as I perform an mouse click on the outline view, its highlighting became normal:
Why did this happen? How can I make the highlighting drawn as blue before any mouse event?
Thank you at advance!
If the outline view doesn't have focus it will use the grey color. Make it first responder, to get focus, and the selection turns blue.
You can make it first responder for example by using NSWindow
s makeFirstResponder:
:
[self.window makeFirstResponder:self.outlineView];