---
title: titleWidth
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsmenuitemcell/titlewidth
---

# titleWidth

The width of the menu item’s text, measured in points.

## Declaration

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

## Discussion

Discussion To set the menu item’s text, use the setTitle: 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)
- [keyEquivalentWidth](appkit/nsmenuitemcell/keyequivalentwidth.md)
- [stateImageWidth](appkit/nsmenuitemcell/stateimagewidth.md)
