<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.0.0 - 10.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSHighlightRect",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@F@NSHighlightRect"
  },
  "title" : "NSHighlightRect"
}
-->

# NSHighlightRect

Highlights the specified rect by filling it with white.

```
extern void NSHighlightRect(NSRect rect);
```

## Parameters

`rect`

The bounding rectangle (in the current coordinate system) in which to draw.

## Discussion

Highlights the rectangle referred to by `aRect`. Light gray becomes white, and white becomes light gray. This function must be called twice, once to highlight the rectangle and once to unhighlight it; the rectangle should not be left in its highlighted state. When not drawing on the screen, the compositing operation is replaced by one that fills the rectangle with light gray.

---

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)