Close Event

This document covers the following topics:


Applies To

Dialog, Dialog Bar Control, OLE Container Control, Tool Bar Control.

Description

Occurs for dialogs whenever the end user selects the Close option on the window's system menu to close a dialog window or whenever the dialog is closed using the CLOSE DIALOG statement. For OLE containers, the event occurs whenever an OLE container application is closed. It can be used to make the associated event handler check if all work has been saved and ask the user to save and close, exit and close, or cancel. When a dialog is closed, all child dialogs are also closed. In this case, the close event handlers of the child dialogs are not triggered. If you want to close the parent dialog and trigger the close event handlers in the child dialogs as well, you use the subprogram NGU-DIALOG-CLOSE-ALL.

In the case of dialog bar and tool bar controls, this event occurs when the user hides the bar via the close button (or via the system menu) when floated. For dialog bar controls, the event also occurs when its close button is clicked whilst the bar is docked.

Note:
In either case, the Close event is not raised if the bar is explicitly closed or hidden by the program, or implicitly with the parent dialog.