Dabo.ui.areYouSure

From Dabo Wiki
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")