Clarify docs for dialog.showMessageBox cancelId

This commit is contained in:
James Wheare 2017-02-24 23:56:47 +00:00 committed by GitHub
parent 8e4bdec6b6
commit cdc6b13fc8

View file

@ -138,11 +138,10 @@ will be passed via `callback(filename)`
* `checkboxChecked` Boolean (optional) - Initial checked state of the
checkbox. `false` by default.
* `icon` [NativeImage](native-image.md) (optional)
* `cancelId` Integer (optional) - The value will be returned when user cancels the dialog
instead of clicking the buttons of the dialog. By default it is the index
of the buttons that have "cancel" or "no" as label, or 0 if there is no such
buttons. On Windows the index of the "Cancel" button will always be used
as `cancelId` even if it is specified.
* `cancelId` Integer (optional) - The index of the button to be used to cancel the dialog, via
the `Esc` key. By default this is assigned to the first button with "cancel" or "no" as the
label. If no such labeled buttons exist and this option is not set, `0` will be used as the
return value or callback response. This option is ignored on Windows.
* `noLink` Boolean (optional) - On Windows Electron will try to figure out which one of
the `buttons` are common buttons (like "Cancel" or "Yes"), and show the
others as command links in the dialog. This can make the dialog appear in