<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/modal-panel-return-values",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Modal Panel Return Values"
}
-->

# Modal Panel Return Values

These constants define the possible return values for such methods as the `runModal...` methods of the [`NSOpenPanel`](/documentation/AppKit/NSOpenPanel) class, which tell which button (OK or Cancel) the user has clicked on an open panel.

## Topics

### Constants

[`var NSCancelButton: Int`](/documentation/AppKit/NSCancelButton)

The Cancel button

[`var NSOKButton: Int`](/documentation/AppKit/NSOKButton)

The OK button



---

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)