<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSegmentedCell/setToolTip(_:forSegment:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSegmentedCell(im)setToolTip:forSegment:"
  },
  "title" : "setToolTip(_:forSegment:)"
}
-->

# setToolTip(_:forSegment:)

Sets the tooltip for the specified segment.

```
func setToolTip(_ toolTip: String?, forSegment segment: Int)
```

## Parameters

`toolTip`

The text of the tooltip you want to display for the segment.

`segment`

The index of the segment whose tooltip you want to set. This method raises an exception (<doc://com.apple.documentation/documentation/Foundation/NSExceptionName/rangeException>) if the index is out of bounds.

## Discussion

Tooltips are currently not displayed.

---

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)