---
title: drawsBackground
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextfield/drawsbackground
---

# drawsBackground

A Boolean value that controls whether the text field’s cell draws a background color behind the text.

## Declaration

```swift
var drawsBackground: Bool { get set }
```

## Discussion

Discussion If true, the text field’s cell draws a background; if false, it draws nothing behind the text. To prevent inconsistent rendering, NSTextField disables background color rendering for text fields with rounded bezels.

## See Also

### Controlling the Background

- [backgroundColor](appkit/nstextfield/backgroundcolor.md)
- [isBezeled](appkit/nstextfield/isbezeled.md)
- [bezelStyle](appkit/nstextfield/bezelstyle-swift.property.md)
- [NSTextField.BezelStyle](appkit/nstextfield/bezelstyle-swift.enum.md)
