---
title: "scrollItemAtIndexToTop(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscombobox/scrollitematindextotop(_:)"
---

# scrollItemAtIndexToTop(_:)

Scrolls the receiver’s pop-up list vertically so that the item at the specified index is as close to the top as possible.

## Declaration

```swift
func scrollItemAtIndexToTop(_ index: Int)
```

## Parameters

- `index`: The index of the item to scroll to the top.

## Discussion

Discussion The pop-up list need not be displayed at the time this method is invoked.

## See Also

### Manipulating the Displayed List

- [indexOfItem(withObjectValue:)](appkit/nscombobox/indexofitem(withobjectvalue:).md)
- [itemObjectValue(at:)](appkit/nscombobox/itemobjectvalue(at:).md)
- [noteNumberOfItemsChanged()](appkit/nscombobox/notenumberofitemschanged().md)
- [reloadData()](appkit/nscombobox/reloaddata().md)
- [scrollItemAtIndexToVisible(_:)](appkit/nscombobox/scrollitematindextovisible(_:).md)
