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

# drawKnobSlot(in:highlight:)

Draws the portion of the scroller’s track, possibly including the line increment and decrement arrow buttons, that falls in the given rectangle.

## Declaration

```swift
func drawKnobSlot(in slotRect: NSRect, highlight flag: Bool)
```

## Parameters

- `slotRect`: The rectangle in which to draw the knob slot.
- `flag`: If flag is doc://com.apple.documentation/documentation/Swift/true, any scroll arrow button that falls within slotRect is drawn highlighted; otherwise it’s drawn normally.

## Discussion

Discussion Only one arrow button will be shown highlighted at a time, so you can expect this method to sometimes be invoked with a slotRect that encompasses only one arrow.

## See Also

### Drawing Scroller Parts

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