<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.0.0 - 10.6.0"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/panel:shouldShowFilename:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Objective-C Runtime"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(im)panel:shouldShowFilename:"
  },
  "title" : "panel:shouldShowFilename:"
}
-->

# panel:shouldShowFilename:

Gives the delegate the opportunity to filter items that it doesn’t want the user to choose.

```
- (BOOL) panel:(id) sender shouldShowFilename:(NSString *) filename;
```

## Parameters

`sender`

Panel that is querying whether it should show a certain file.

`filename`

String representing the name of the file to be loaded in the browser.

## Return Value

[`YES`](/documentation/ObjectiveC/YES) if `filename` should be selectable, and [`NO`](/documentation/ObjectiveC/NO) if the save panel should disable the file or directory.

## Discussion

The `NSSavePanel` object `sender` sends this message to the panel’s delegate for each file or directory (filename) it is about to load in the browser.

## See Also

  <doc://com.apple.documentation/documentation/AppKit/NSOpenSavePanelDelegate/panel(_:shouldEnable:)>



---

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)