Removing the "New Folder" button from OpenFileDialog

Creating a an OpenFileDialog to choose a file, I get a “New Folder” button in the lower left hand corner of the Open File Dialog. A bit out of place (not sure why I’d want or need to create a new folder when I am opening a file…) so how do I get rid of it?

dialog = New OpenFileDialog
dialog.Filter = htmlType
f = dialog.ShowModal

Any thoughts welcome!

That’s part of the OS dialog.

Thanks Greg, does that mean there is no way to remove it? Is there perhaps another dialog instead without it?

There is an option to not show this button, but to get at it, you need to re-write the entire OpenDialog class as Xojo has not exposed the .handle, which would allow us to alter this option.

I have a Feeedback request for exposing the .handle.

Edit: <>

It would also enable us to customize the options and use the built-in OS supplied tags field.


Maybe @Christian_Schmitz has something that works (similar to Customized File Open and Save Dialogs for Windows).

You can also list all the files in a listbox, and when the user clicks on a file, it opens it.

You can even create a mockup of the open file dialog for the user interface coherence

Thank you, Sam.

1 Like

I think Michel, I’ll do something along the lines of your suggestion. I hindsight, all I need is a list of possible files from which to choose.


this is anyway quite strange.
that you have a “new folder” button for a savefolderitem is normal
but for an openfolderitem dialog, how would you create a folder while opening a file ???

1 Like


It’s a part of the OS dialog that the OS allows you to hide — Xojo just doesn’t give us that option.


See NSSavePanelMBS and NSOpenPanelMBS classes with canCreateDirectories properties for macOS.

1 Like

Thanks Christian, appreciate your leads here!

1 Like