<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSComboButton",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSComboButton"
  },
  "title" : "NSComboButton"
}
-->

# NSComboButton

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

```
class NSComboButton
```

## Overview

An [`NSComboButton`](/documentation/AppKit/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`](/documentation/AppKit/NSComboButton/style-swift.property) 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`](/documentation/AppKit/NSControl/target) and [`action`](/documentation/AppKit/NSControl/action) properties. To specify one or more alternative actions, configure a menu with those actions and assign it to the button’s [`menu`](/documentation/AppKit/NSComboButton/menu) property.

This control doesn’t use an [`NSCell`](/documentation/AppKit/NSCell) object for its underlying implementation. It also doesn’t support the addition of a contextual menu.

## Topics

### Creating a Combo Button

[`init(title:image:menu:target:action:)`](/documentation/AppKit/NSComboButton/init(title:image:menu:target:action:))

Creates a combo button that displays both a title and image.

[`init(title:menu:target:action:)`](/documentation/AppKit/NSComboButton/init(title:menu:target:action:))

Creates a combo button that displays a title.

[`init(image:menu:target:action:)`](/documentation/AppKit/NSComboButton/init(image:menu:target:action:))

Creates a combo button that displays an image.

### Configuring the Button Appearance

[`style`](/documentation/AppKit/NSComboButton/style-swift.property)

The appearance setting that determines how the button presents its menu .

[`NSComboButton.Style`](/documentation/AppKit/NSComboButton/Style-swift.enum)

Constants that indicate how a combo button presents its menu.

[`title`](/documentation/AppKit/NSComboButton/title)

The localized string that the button displays.

[`image`](/documentation/AppKit/NSComboButton/image)

The image that the button displays.

[`imageScaling`](/documentation/AppKit/NSComboButton/imageScaling)

The scaling behavior to apply to the button’s image.

### Specifying the Alternative Actions

[`menu`](/documentation/AppKit/NSComboButton/menu)

The menu that contains the button’s alternate actions.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)
