<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSButtonCell/showsBorderOnlyWhileMouseInside",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSButtonCell(py)showsBorderOnlyWhileMouseInside"
  },
  "title" : "showsBorderOnlyWhileMouseInside"
}
-->

# showsBorderOnlyWhileMouseInside

A Boolean value that indicates if the button displays its border only when the pointer is over it.

```
var showsBorderOnlyWhileMouseInside: Bool { get set }
```

## Discussion

When the value of this property is <doc://com.apple.documentation/documentation/Swift/true> if the button’s border is displayed only when the pointer is over the button and the button is active. When it is <doc://com.apple.documentation/documentation/Swift/false>, the border continues to display when the pointer is outside of the button’s bounds.

---

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)