---
title: "mouseExited(with:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsbuttoncell/mouseexited(with:)"
---

# mouseExited(with:)

Erases the button’s border.

## Declaration

```swift
func mouseExited(with event: NSEvent)
```

## Parameters

- `event`: The event object generated by the mouse movement.

## Discussion

Discussion This method is called only when the pointer moves off the button and the value of showsBorderOnlyWhileMouseInside is true.

## See Also

### Handling Events and Action Messages

- [mouseEntered(with:)](appkit/nsbuttoncell/mouseentered(with:).md)
- [performClick(_:)](appkit/nsbuttoncell/performclick(_:).md)
