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

# preferredEdge

The edge of the button on which to display the menu when screen space is constrained.

```
var preferredEdge: NSRectEdge { get set }
```

## Discussion

Possible values include <doc://com.apple.documentation/documentation/Foundation/NSRectEdge/NSMinXEdge>, <doc://com.apple.documentation/documentation/Foundation/NSRectEdge/NSMinYEdge>, <doc://com.apple.documentation/documentation/Foundation/NSRectEdge/NSMaxXEdge>, or <doc://com.apple.documentation/documentation/Foundation/NSRectEdge/NSMaxYEdge>. For pull-down menus, the default behavior is to position the menu under the button. The bottom edge corresponds to the value `NSMaxYEdge` for flipped views or `NSMinYEdge` for unflipped views. For most pop-up menus, the `NSPopUpButton` object attempts to show the selected item directly over the 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)