This repository has been archived on 2023-04-23. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
KorbsStudio ffc5afec1c
Update
2023-01-05 20:23:12 -05:00
.gitignore Remove remote process and use ipcMain 2021-08-29 20:29:56 -04:00
LICENSE Initial commit 2021-05-29 02:36:36 -04:00
README.md Update preview area 2021-08-29 20:51:28 -04:00
index.html Add Open File dialog 2023-01-05 20:23:03 -05:00
main.js Add Open File dialog 2023-01-05 20:23:03 -05:00
package-lock.json Update 2023-01-05 20:23:12 -05:00
package.json Update to latest version of ElectronJS 2023-01-05 20:22:45 -05:00
preload.js Add Open File dialog 2023-01-05 20:23:03 -05:00

Electron Dialog

Electron Documention: https://www.electronjs.org/docs/api/dialog

Preview

Windows

Message Dialog:

Message

Question Dialog:

Question

Error Dialog:

Error

macOS

No preview available, I don't own a mac :)

Linux

Message Dialog:

Message

Question Dialog:

Question

Error Dialog:

Error

Dialogs

Message

const options = {
    type: 'info',
    title: 'Dialog',
    message: 'Title of dialog.',
    detail: 'Details for the message dialog.',
};

dialog.showMessageBox(null, options, (response, checkboxChecked) => {});

Question

const options = {
    type: 'question',
    buttons: ['Cancel', 'Option One', 'Option Two', 'Option Three'],
    defaultId: 2,
    title: 'Dialog',
    message: 'Do you want to continue?',
    detail: 'Choose any of the options below or cancel.',
    checkboxLabel: 'This is a checkbox',
    checkboxChecked: true,
};

dialog.showMessageBox(null, options, (response, checkboxChecked) => {});

Error Message

const options = {
    type: 'error',
    title: 'Dialog',
    message: 'Title of error.',
    detail: 'Details for the error dialog.',
};

dialog.showMessageBox(null, options, (response, checkboxChecked) => {});