Dialog

Overview

The dialog allows you to ask a question to the user or prompt them with a choice prior to the application continuing. Note you can listen for whether the user makes a choice through the inherited 'click' event, a parameter is passed into the callback with the value of 'main' or 'aux' to indicate the pressed button on the dialog.

Ancestors

  1. Control
 

Descendants

  1. None
 

See Also

  1. None

Constructors

new Dialog
Description

Creates a new Dialog window hidden by default.

Definition

new Dialog()

Members

auxbutton
Description

Gets or sets the text label of the auxillary button.

Definition

string dialog.auxbutton
icon
Description

Gets or sets the image associated with the dialog, by default this will use the icon from Application#icon. An image can be any url, including the app:// schema, or a named system icon resource.

Definition

string dialog.icon
mainbutton
Description

Gets or sets the text label of the main button.

Definition

string dialog.mainbutton
message
Description

Gets or sets the text shown as a message or question to the user.

Definition

string dialog.message
suppression
Description

Gets or sets the text label of the suppress option. This is useful if you'd like to add an option on the dialog to not show this dialog again. Setting this to anything other than null uses the value as the title and makes the check box visible.

Definition

string dialog.suppression
suppressionChecked
Description

Gets or sets whether the suppression box is checked.

Definition

boolean dialog.suppressionChecked
title
Description

Gets or sets the caption or title of the dialog modal window.

Definition

string dialog.title

Methods

open()
Description

Opens the dialog and presents it to the user. An optional window can be passed into the function to specify which window the dialog may be protecting. This is useful as it allows you to prevent any window interaction from happening unitl the user responds to the dialog. In OSX this is displayed as a sheet over the window, on Windows the modal pop-up prevents mouse or keyboard interactions while it's open. If no window is provided the dialog is opened on top of all or any open windows and does not prevent users from interacting with any window of the application.

Definition

dialog.open()
Parameters
NameTypeDescription
Window

Events

click
Description

Fires when the user clicks either the auxillary button or main button 'aux' is passed in to the callback when the auxillary button is pressed. 'main' is passed in to the callback when the main button is pressed.

Definition

dialog.addEventListener('click', function() { ... });