Dabo.ui.areYouSure

From Dabo Wiki
Revision as of 18:04, 13 May 2020 by Ed (talk | contribs) (Created page with "== Signature: == <syntaxhighlight lang="python"> dabo.ui.areYouSure(message="Are you sure?", title=None, defaultNo=False, cancelButton=True, parent=None) </syntaxhighlight>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Signature:

dabo.ui.areYouSure(message="Are you sure?", title=None, defaultNo=False, cancelButton=True, parent=None)

Description:

Used to get confirmation from the user before proceeding. They may answer "Yes" or "No", or (optionally) "Cancel".

Returns:

True (if they chose "Yes") False (if they chose "No") None (if they chose "Cancel")

Comments:

Used to present the user with a choice on how to proceed. Commonly used in potentially destructive situations to alert the user that there may be serious consequences for an action, and allowing them to abort the process if they wish.

Examples:

dabo.ui.areYouSure("Deleting this record is immediate and cannot be reversed. Are you sure you want to proceed?",
        defaultNo=True, cancelButton=False)
dabo.ui.areYouSure("Do you want to save your changes?", title="Unsaved Changes")