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

# indexOfSelectedItem

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

## Declaration

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

## Discussion

Discussion The value of this property is -1 if no item is selected; otherwise, it is the index of the selected item. Nothing is selected in a newly initialized combo box.

## See Also

### Manipulating the Selection

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