jin
jin

Reputation: 2155

How to click the segmentedControl object and use it to change view?

I want to implement just like interface builder segmented control, and click it to change views , I don't know under the segment if a NSBrowser or not. and how to change the view , can you give me some sample codes or a demo? Thank you very much!

Upvotes: 0

Views: 439

Answers (2)

Johan Kool
Johan Kool

Reputation: 15927

Use NSSegmentedControl for the segmented control, and a tabless NSTabView to switch between views. If it makes sense in your app, you could even bind both to the same user default and implement this without writing a single line of code.

Upvotes: 1

Peter Hosey
Peter Hosey

Reputation: 96323

A segmented control is an NSSegmentedControl.

Upvotes: 1

Related Questions