Combo Boxes
Combo boxes are a cross between a text field and a pop-up button. A combo box contains an editable text field cell and a button to the right of the text field cell. The button cell has a down pointing arrow, similar to a pull-down list. Clicking the button opens a list of items from which the user can choose a value. Combo boxes also support autocompletion as an option.
Cocoa uses the NSComboBox and NSComboBoxCell classes to implement combo boxes. These classes inherit from NSTextField and NSTextFieldCell, respectively. All the text field manipulations described in Chapter 10 apply to the text field portion of the combo box.
Because a combo box has a pull-down list from which a user can choose, it acts much like a pop-up button, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access