---
title: "drawBar(inside:flipped:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsslidercell/drawbar(inside:flipped:)"
---

# drawBar(inside:flipped:)

Draws the slider’s bar—but not its bezel or knob—inside the specified rectangle.

## Declaration

```swift
func drawBar(inside rect: NSRect, flipped: Bool)
```

## Parameters

- `rect`: The bounds of the slider’s bar, not of its interior rectangle.
- `flipped`: A Boolean value that indicates whether the cell’s control view—that is, the NSSlider or NSMatrix associated with the NSSliderCell—has a flipped coordinate system.

## Discussion

Discussion You should not call this method explicitly. It’s included so you can override it in a subclass.

## See Also

### Displaying the Cell

- [barRect(flipped:)](appkit/nsslidercell/barrect(flipped:).md)
- [drawTickMarks()](appkit/nsslidercell/drawtickmarks().md)
- [knobRect(flipped:)](appkit/nsslidercell/knobrect(flipped:).md)
- [drawKnob()](appkit/nsslidercell/drawknob().md)
- [drawKnob(_:)](appkit/nsslidercell/drawknob(_:).md)
