NSToolbar: how do I initialise with a selected item?
Asked Answered
B

1

5

I have a Mac OS application with a preferences window with a NSToolbar on it.

I have also a custom subview under it and other 3 custom views that are loaded inside the first one when the user clicks on one of the options.

So far, so good. Now I realised the first item is not selected by default when the window is loaded.

I see no options in the inspectors, except the "selectable", which I used. But there is no "selected". Should I do it programmatically? How?

Bourse answered 12/6, 2012 at 20:10 Comment(0)
I
10

NSToolbar has a -setSelectedItemIdentifier: method that you can use in your -windowDidLoad method.

Intransigent answered 12/6, 2012 at 22:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.