---
title: resetCancelButtonCell()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nssearchfieldcell/resetcancelbuttoncell()
---

# resetCancelButtonCell()

Resets the cancel button cell to its default attributes.

## Declaration

```swift
func resetCancelButtonCell()
```

## Discussion

Discussion This method resets the target, action, regular image, and pressed image for the cancel button cell. By default, when users click the cancel button, the delete: action message is sent up the responder chain to the first NSText object that can handle it. This method gives you a way to customize the cancel button for specific situations and then reset the button defaults without having to undo changes individually.

## See Also

### Managing buttons

- [searchButtonCell](appkit/nssearchfieldcell/searchbuttoncell.md)
- [resetSearchButtonCell()](appkit/nssearchfieldcell/resetsearchbuttoncell().md)
- [cancelButtonCell](appkit/nssearchfieldcell/cancelbuttoncell.md)
