<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCell/setCellAttribute(_:to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCell(im)setCellAttribute:to:"
  },
  "title" : "setCellAttribute(_:to:)"
}
-->

# setCellAttribute(_:to:)

Sets the value for the specified cell attribute.

```
func setCellAttribute(_ parameter: NSCell.Attribute, to value: Int)
```

## Parameters

`parameter`

The cell attribute whose value you want to set. Attributes include the receiver’s current state and  whether it is disabled, editable, or highlighted.

`value`

The new value for the attribute.

---

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)