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

# scrollItemAtIndexToTop(_:)

Scrolls the combo box’s pop-up list vertically so that the item at the given 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/nscomboboxcell/indexofitem(withobjectvalue:).md)
- [itemObjectValue(at:)](appkit/nscomboboxcell/itemobjectvalue(at:).md)
- [noteNumberOfItemsChanged()](appkit/nscomboboxcell/notenumberofitemschanged().md)
- [reloadData()](appkit/nscomboboxcell/reloaddata().md)
- [scrollItemAtIndexToVisible(_:)](appkit/nscomboboxcell/scrollitematindextovisible(_:).md)
