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

# mouseEntered(with:)

Draws the button’s border.

## Declaration

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

## Parameters

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

## Discussion

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

## See Also

### Handling Events and Action Messages

- [mouseExited(with:)](appkit/nsbuttoncell/mouseexited(with:).md)
- [performClick(_:)](appkit/nsbuttoncell/performclick(_:).md)
