Leave Event

This document covers the following topics:


Applies To

Dialog, ActiveX Controls, Column Specification Control, Date and Time Picker (DTP) Control, Edit Area Control, Input Field Control, Selection Box Control, Tab Control Tab, Table Control.

Description

Occurs whenever the dialog or dialog element loses the focus. You can use the leave event handler to validate field entries or to dynamically modify other dialog elements whose status depends on that of the dialog element just left. Does not occur on closing a dialog.

For table controls, this event occurs if the end user leaves a row or if the table loses the focus. If the end user leaves a cell, the leave-cell event occurs.

If this event occurs in a cell of a Table Control, the ROW and COLUMN attributes are modified so that they contain the position of the cell.

Before this event handler code is processed, end user input in (linked variable) input-field controls and selection-box controls is checked against any EDIT-MASK value or applicable Natural data type. However, in the following situations the leave event is not triggered after end user input was checked and a linked variable was updated:

  • An Input Field Control or a Selection Box Control has the focus and the end user clicks a menu item; or

  • the end user presses ENTER, triggering the default button; or

  • the end user presses ENTER, triggering the OK button; or

  • the end user presses an accelerator key.

Note:
It is not recommended to execute the PROCESS GUI statement action SET-FOCUS from the leave event because the leave event implies that the focus is to be set to yet another part of the application.