---
title: "highlight(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsscroller/highlight(_:)"
---

# highlight(_:)

Highlights or unhighlights the scroll button the user clicked.

## Declaration

```swift
func highlight(_ flag: Bool)
```

## Discussion

Discussion The receiver invokes this method while tracking the mouse; you should not invoke it directly. If flag is true, the appropriate part is drawn highlighted; otherwise it’s drawn normally. Special Considerations This method has no effect in macOS 10.7 and later.

## See Also

### Related Documentation

- [rect(for:)](appkit/nsscroller/rect(for:).md)

### Drawing Scroller Parts

- [drawArrow(_:highlight:)](appkit/nsscroller/drawarrow(_:highlight:).md)
- [drawKnobSlot(in:highlight:)](appkit/nsscroller/drawknobslot(in:highlight:).md)
- [drawKnob()](appkit/nsscroller/drawknob().md)
