You’re previewing Ry’s Cocoa TutorialUI Components

Combo Boxes

A Combo Box is a cross between the Text Field and Pop-Up Button controls. It lets the user enter a value either as text or from a list of pre-defined values. The text field can be used as a quick way to select an item from the list, or to enter an arbitrary value that isn’t contained in the list. It’s represented by the NSComboBox class.

Open and closed state of a Combo Box

This is a good option if the user doesn’t always know what choices are available, or if there are common values to choose from. It’s a potential alternative to a Pop-Up Button or a Slider/Text Field combination. For example, you could use either a Combo Box or a Slider to let the user zoom in on some content.

Combo Boxes are fairly straightforward to configure. This chapter takes a brief look at defining the list of items, accessing the current value, and selecting items programmatically.

Sorry, this is the end of the preview. To read the rest of this chapter, you’ll need to purchase Ry’s Cocoa Tutorial.

Mailing List

Sign up for my low-volume mailing list to find out when new content is released. Next up is a comprehensive Swift tutorial planned for late January.

You’ll only receive emails when new tutorials are released, and your contact information will never be shared with third parties. Click here to unsubscribe.