---
title: stateImageWidth
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsmenuitemcell/stateimagewidth
---

# stateImageWidth

The width of the image used to indicate the state of the menu item.

## Declaration

```swift
var stateImageWidth: CGFloat { get }
```

## Discussion

Discussion If the menu item has multiple images associated with it (to indicate any of the available states: on, off, or mixed), this property contains the width of the largest image. You can set the state images for a menu item using the setOnStateImage:, setOffStateImage:, and setMixedStateImage: methods of NSMenuItem. To change the state of the cell’s menu item, use the setState: method of NSMenuItem.

## See Also

### Calculating the Size of a Menu Item

- [calcSize()](appkit/nsmenuitemcell/calcsize().md)
- [needsSizing](appkit/nsmenuitemcell/needssizing.md)
- [imageWidth](appkit/nsmenuitemcell/imagewidth.md)
- [titleWidth](appkit/nsmenuitemcell/titlewidth.md)
- [keyEquivalentWidth](appkit/nsmenuitemcell/keyequivalentwidth.md)
