---
title: indexOfSelectedItem
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nscomboboxcell/indexofselecteditem
---

# indexOfSelectedItem

The index of the last item selected from the pop-up list.

## Declaration

```swift
var indexOfSelectedItem: Int { get }
```

## Discussion

Discussion The index of the last item selected from the combo box’s pop-up list or –1 if no item is selected. Note that nothing is initially selected in a newly initialized combo box cell.

## See Also

### Manipulating the Selection

- [deselectItem(at:)](appkit/nscomboboxcell/deselectitem(at:).md)
- [objectValueOfSelectedItem](appkit/nscomboboxcell/objectvalueofselecteditem.md)
- [selectItem(at:)](appkit/nscomboboxcell/selectitem(at:).md)
- [selectItem(withObjectValue:)](appkit/nscomboboxcell/selectitem(withobjectvalue:).md)
