Link Search Menu Expand Document

Dialog.Close Event

Occurs when pressing the close button in the upper right corner of the dialog.

If this event is caught by the event handler, the action of closing the dialog will be cancelled. To close the dialog, delete the Dialog object in the event handler.

Example

Function OnClose (e) {
    if (...) {
        Dialog1.Delete ();
    }
}

The following specifications have been added to AI-->

In the Android version, the following objects are added as child objects of the Event object.

Type Name Description
Number CauseClose A value that describes how the Dialog is about to be closed.

CauseClose contains the following constant values ​​that indicate how it is about to be closed.

Constant name Value Meaning
Dialog.CLOSE_ON_BACK_KEY 1 When you try to close by pressing the Back key of Android
Dialog.CLOSE_ON_TOUCH_OUTSIDE 2 When you try to close by tapping outside the dialog
( Only occurs on Android 3.x and above )

Example

Function OnClose (e) {
    if (e.CauseClose == Dialog.CLOSE_ON_BACK_KEY) {
        / * Closes the dialog only when the "Back" button on the terminal is pressed * /
        Dialog1.Delete ();
    }
}

<--Up to here