<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOpenSavePanelDelegate/panel(_:willExpand:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSOpenSavePanelDelegate(im)panel:willExpand:"
  },
  "title" : "panel(_:willExpand:)"
}
-->

# panel(_:willExpand:)

Tells the delegate that the Save panel is about to expand or collapse because the user clicked the disclosure triangle that displays or hides the file browser.

```
@MainActor optional func panel(_ sender: Any, willExpand expanding: Bool)
```

## Parameters

`sender`

The panel that is about to expand or collapse.

`expanding`

<doc://com.apple.documentation/documentation/Swift/true> specifies that the panel is expanding; <doc://com.apple.documentation/documentation/Swift/false> specifies that it is collapsing.

## Discussion

---

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)