---
title: "setCellAttribute(_:to:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscell/setcellattribute(_:to:)"
---

# setCellAttribute(_:to:)

Sets the value for the specified cell attribute.

## Declaration

```swift
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.

## See Also

### Managing Cell Attributes

- [cellAttribute(_:)](appkit/nscell/cellattribute(_:).md)
- [type](appkit/nscell/type.md)
- [isEnabled](appkit/nscell/isenabled.md)
- [allowsUndo](appkit/nscell/allowsundo.md)
