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