Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

162
Views
Electron - dialog.showOpenDialog how to open directory selection dialog box and show "grayed out" files on windows
ipcMain.on("event", async (event) => {
  const result = await dialog.showOpenDialog(mainWindow, {
    properties: ["openDirectory"],
  });
  event.returnValue = result.filePaths;
});

on macOS I see files being grayed out, but on windows I can only see folders.

How can I make it so windows folder selection dialog box shows the files inside the folder I select?

example on mac (files being grayed out):

https://i.stack.imgur.com/qP1iv.png

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You should use a OpenFileDialog

 dialog.showOpenDialog({ properties: ['openFile', 'multiSelections'] })

As per documentation that can be found here

electronjs.org/docs/latest/api/dialog

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!