<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPopUpButtonCell/altersStateOfSelectedItem",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPopUpButtonCell(py)altersStateOfSelectedItem"
  },
  "title" : "altersStateOfSelectedItem"
}
-->

# altersStateOfSelectedItem

A Boolean value that indicates if the pop-up button links the state of the selected menu item to the current selection.

```
var altersStateOfSelectedItem: Bool { get set }
```

## Discussion

When the value of this property is <doc://com.apple.documentation/documentation/Swift/true> (which is the default value), the state of the selected item is set to [`NSOnState`](/documentation/AppKit/NSOnState). When the value of this property is <doc://com.apple.documentation/documentation/Swift/false>, the items in the menu are left alone. When you change the value of this property, the state of the currently selected item is updated appropriately.

Note that this property affects only pop-up buttons (it is ignored for pull-down menus).

## See Also

[`selectItem(at:)`](/documentation/AppKit/NSPopUpButtonCell/selectItem(at:))

Selects the item in the menu at the specified index.

[`select(_:)`](/documentation/AppKit/NSPopUpButtonCell/select(_:))

Selects the specified menu item.

[`selectedItem`](/documentation/AppKit/NSPopUpButtonCell/selectedItem)

The menu item last selected by the user.

[`selectItem(withTitle:)`](/documentation/AppKit/NSPopUpButtonCell/selectItem(withTitle:))

Selects the item with the specified title.



---

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)