<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCell/Attribute",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSCellAttribute"
  },
  "title" : "NSCell.Attribute"
}
-->

# NSCell.Attribute

Constants for specifying how a button behaves when pressed and how it displays its state.

```
enum Attribute
```

## Overview

These constants are used by the [`NSButton`](/documentation/AppKit/NSButton) and [`NSButtonCell`](/documentation/AppKit/NSButtonCell) classes.

## Topics

### Constants

[`NSCellAllowsMixedState`](/documentation/AppKit/NSCell/Attribute/cellAllowsMixedState)

Lets the cell’s state be `NSMixedState`, as well as `NSOffState` and `NSOnState`.

[`NSChangeBackgroundCell`](/documentation/AppKit/NSCell/Attribute/changeBackgroundCell)

If the cell’s state is `NSMixedState` or `NSOnState`, changes the cell’s background color from gray to white.

[`NSCellChangesContents`](/documentation/AppKit/NSCell/Attribute/cellChangesContents)

If the cell’s state is `NSMixedState` or `NSOnState`, displays the cell’s alternate image.

[`NSChangeGrayCell`](/documentation/AppKit/NSCell/Attribute/changeGrayCell)

If the cell’s state is `NSMixedState` or `NSOnState`, displays the cell’s image as darkened.

[`NSCellDisabled`](/documentation/AppKit/NSCell/Attribute/cellDisabled)

Does not let the user manipulate the cell.

[`NSCellEditable`](/documentation/AppKit/NSCell/Attribute/cellEditable)

Lets the user edit the cell’s contents.

[`NSCellHasImageHorizontal`](/documentation/AppKit/NSCell/Attribute/cellHasImageHorizontal)

Controls the position of the cell’s image: places the image on the right of any text in the cell.

[`NSCellHasImageOnLeftOrBottom`](/documentation/AppKit/NSCell/Attribute/cellHasImageOnLeftOrBottom)

Controls the position of the cell’s image: places the image on the left of or below any text in the cell.

[`NSCellHasOverlappingImage`](/documentation/AppKit/NSCell/Attribute/cellHasOverlappingImage)

Controls the position of the cell’s image: places the image over any text in the cell.

[`NSCellHighlighted`](/documentation/AppKit/NSCell/Attribute/cellHighlighted)

Draws the cell with a highlighted appearance.

[`NSCellIsBordered`](/documentation/AppKit/NSCell/Attribute/cellIsBordered)

Draws a border around the cell.

[`NSCellIsInsetButton`](/documentation/AppKit/NSCell/Attribute/cellIsInsetButton)

Insets the cell’s contents from the border.

[`NSCellLightsByBackground`](/documentation/AppKit/NSCell/Attribute/cellLightsByBackground)

If the cell is pushed in, changes the cell’s background color from gray to white.

[`NSCellLightsByContents`](/documentation/AppKit/NSCell/Attribute/cellLightsByContents)

If the cell is pushed in, displays the cell’s alternate image.

[`NSCellLightsByGray`](/documentation/AppKit/NSCell/Attribute/cellLightsByGray)

If the cell is pushed in, displays the cell’s image as darkened.

[`NSPushInCell`](/documentation/AppKit/NSCell/Attribute/pushInCell)

Determines whether the cell’s image and text appear to be shifted down and to the right.

[`NSCellState`](/documentation/AppKit/NSCell/Attribute/cellState)

The cell’s state.

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

---

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)