---
title: NSPopUpButtonCell
framework: appkit
role: symbol
role_heading: Class
path: appkit/nspopupbuttoncell
---

# NSPopUpButtonCell

The NSPopUpButtonCell class defines the visual appearance of pop-up buttons that display pop-up or pull-down menus. Pop-up menus present the user with a set of choices, much the way radio buttons do, but using much less space. Pull-down menus also provide a set of choices but present the information in a slightly different way, usually to provide a set of commands from which the user can choose.

## Declaration

```swift
class NSPopUpButtonCell
```

## Overview

Overview The NSPopUpButtonCell class implements the user interface for the NSPopUpButton class. Changes made to a menu (such as adding, removing, or changing the items) are not apparent while the menu is being displayed or interacted with. important: Setting a pop up button’s image property has no effect. The image displayed in a pop up button is taken from the selected menu item (in the case of a pop up menu) or from the first menu item (in the case of a pull-down menu).

## Topics

### Initialization

- [init(textCell:pullsDown:)](appkit/nspopupbuttoncell/init(textcell:pullsdown:).md)

### Accessing menu attributes

- [menu](appkit/nspopupbuttoncell/menu.md)
- [pullsDown](appkit/nspopupbuttoncell/pullsdown.md)
- [autoenablesItems](appkit/nspopupbuttoncell/autoenablesitems.md)
- [preferredEdge](appkit/nspopupbuttoncell/preferrededge.md)
- [usesItemFromMenu](appkit/nspopupbuttoncell/usesitemfrommenu.md)
- [altersStateOfSelectedItem](appkit/nspopupbuttoncell/altersstateofselecteditem.md)
- [arrowPosition](appkit/nspopupbuttoncell/arrowposition.md)

### Adding and removing items

- [addItem(withTitle:)](appkit/nspopupbuttoncell/additem(withtitle:).md)
- [addItems(withTitles:)](appkit/nspopupbuttoncell/additems(withtitles:).md)
- [insertItem(withTitle:at:)](appkit/nspopupbuttoncell/insertitem(withtitle:at:).md)
- [removeItem(withTitle:)](appkit/nspopupbuttoncell/removeitem(withtitle:).md)
- [removeItem(at:)](appkit/nspopupbuttoncell/removeitem(at:).md)
- [removeAllItems()](appkit/nspopupbuttoncell/removeallitems().md)

### Accessing the items

- [itemArray](appkit/nspopupbuttoncell/itemarray.md)
- [numberOfItems](appkit/nspopupbuttoncell/numberofitems.md)
- [index(of:)](appkit/nspopupbuttoncell/index(of:).md)
- [indexOfItem(withTitle:)](appkit/nspopupbuttoncell/indexofitem(withtitle:).md)
- [indexOfItem(withTag:)](appkit/nspopupbuttoncell/indexofitem(withtag:).md)
- [indexOfItem(withRepresentedObject:)](appkit/nspopupbuttoncell/indexofitem(withrepresentedobject:).md)
- [indexOfItem(withTarget:andAction:)](appkit/nspopupbuttoncell/indexofitem(withtarget:andaction:).md)
- [item(at:)](appkit/nspopupbuttoncell/item(at:).md)
- [item(withTitle:)](appkit/nspopupbuttoncell/item(withtitle:).md)
- [lastItem](appkit/nspopupbuttoncell/lastitem.md)

### Dealing with selection

- [select(_:)](appkit/nspopupbuttoncell/select(_:).md)
- [selectItem(at:)](appkit/nspopupbuttoncell/selectitem(at:).md)
- [selectItem(withTag:)](appkit/nspopupbuttoncell/selectitem(withtag:).md)
- [selectItem(withTitle:)](appkit/nspopupbuttoncell/selectitem(withtitle:).md)
- [setTitle(_:)](appkit/nspopupbuttoncell/settitle(_:).md)
- [selectedItem](appkit/nspopupbuttoncell/selecteditem.md)
- [indexOfSelectedItem](appkit/nspopupbuttoncell/indexofselecteditem.md)
- [synchronizeTitleAndSelectedItem()](appkit/nspopupbuttoncell/synchronizetitleandselecteditem().md)

### Title conveniences

- [itemTitle(at:)](appkit/nspopupbuttoncell/itemtitle(at:).md)
- [itemTitles](appkit/nspopupbuttoncell/itemtitles.md)
- [titleOfSelectedItem](appkit/nspopupbuttoncell/titleofselecteditem.md)

### Handling events and action messages

- [attachPopUp(withFrame:in:)](appkit/nspopupbuttoncell/attachpopup(withframe:in:).md)
- [dismissPopUp()](appkit/nspopupbuttoncell/dismisspopup().md)
- [performClick(withFrame:in:)](appkit/nspopupbuttoncell/performclick(withframe:in:).md)

### Constants

- [NSPopUpButton.ArrowPosition](appkit/nspopupbutton/arrowposition.md)

### Notifications

- [willPopUpNotification](appkit/nspopupbuttoncell/willpopupnotification.md)

### Initializers

- [init(coder:)](appkit/nspopupbuttoncell/init(coder:).md)

### Structures

- [NSPopUpButtonCell.WillPopUpMessage](appkit/nspopupbuttoncell/willpopupmessage.md)

## Relationships

### Inherits From

- [NSMenuItemCell](appkit/nsmenuitemcell.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSMenuItemValidation](appkit/nsmenuitemvalidation.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
