<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSComboBoxDataSource",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSComboBoxDataSource"
  },
  "title" : "NSComboBoxDataSource"
}
-->

# NSComboBoxDataSource

```
protocol NSComboBoxDataSource : NSObjectProtocol
```

## Topics

### Instance Methods

[`comboBox(_:completedString:)`](/documentation/AppKit/NSComboBoxDataSource/comboBox(_:completedString:))

Returns the first item from the pop-up list that starts with the text the user has typed.

[`comboBox(_:indexOfItemWithStringValue:)`](/documentation/AppKit/NSComboBoxDataSource/comboBox(_:indexOfItemWithStringValue:))

Returns the index of the combo box item matching the specified string.

[`comboBox(_:objectValueForItemAt:)`](/documentation/AppKit/NSComboBoxDataSource/comboBox(_:objectValueForItemAt:))

Returns the object that corresponds to the item at the specified index in the combo box.

[`numberOfItems(in:)`](/documentation/AppKit/NSComboBoxDataSource/numberOfItems(in:))

Returns the number of items that the data source manages for the combo box.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)