Is there a possibility to display files in the showOpenDialog even when the property is set to 'openDirectory'? Of course, files should not be selectable, but maybe shown greyed out. So the user knows that he selects the right directory. On OSX everything is fine, but on Windows the files are not shown at all.
I already tried to display hiddenFiles and added filters. But nothing worked :-/
Thanks in advance! Cheers
It works for me (on OSX) – I see greyed out files – perhaps you are calling it wrong?
function showDirectorySelector() {
var options = {
title: "Select Directory",
properties: ['openDirectory'],
}
dialog.showOpenDialog(mainWindow, options, directorySelectorCallback);
}
function directorySelectorCallback(filenames) {
if (filenames && filenames.length > 0) {
mainWindow.webContents.send('project-directory-selected', filenames[0]);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With