---
title: "panel(_:willExpand:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsopensavepaneldelegate/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.

## Declaration

```swift
@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.

## See Also

### Responding to Panel Changes

- [panelSelectionDidChange(_:)](appkit/nsopensavepaneldelegate/panelselectiondidchange(_:).md)
- [panel(_:didChangeToDirectoryURL:)](appkit/nsopensavepaneldelegate/panel(_:didchangetodirectoryurl:).md)
