Contents

NSComboButton

A button with a pull-down menu and a default action.

Declaration

class NSComboButton

Overview

An NSComboButton object is a button that displays a title string, image, and an optional control for displaying a menu. Use this control in places where you want to offer a button with a default action and one or more alternative actions. Clicking the title or image executes the default action you provide, and clicking the menu control displays a menu for selecting a different action. If you configure the button to hide the menu control, a long-press gesture displays the menu.

After you create a combo button programmatically or in Interface Builder, choose the button style you want and add a title or image for your content. A combo button has a default action, which you specify at creation time. You can also change that action later using the inherited target and action properties. To specify one or more alternative actions, configure a menu with those actions and assign it to the button’s menu property.

This control doesn’t use an NSCell object for its underlying implementation. It also doesn’t support the addition of a contextual menu.

Topics

Creating a Combo Button

Configuring the Button Appearance

Specifying the Alternative Actions

See Also

Controls