Callback Events

A "callback event" (or simply an "event") is an interaction, between the end-user and the application interface, that causes a FORM INPUT or MENU INPUT command to terminate, and control to pass the next command in the executing program.

There are two types of potential events that can occur: object dependent and object independent.

Event Type Description
Object Independent Established by the Zim language commands FORM SET TRANSMIT and FORM SET EXIT. These event types are independent of the objects (such as Form Fields, Menu Items, etc.) presented in the application's user interface
Object Dependent Associated with one or more objects within a specific user interface presentation. In the context of designing user interface objects with ZimIDE, only object-dependent events are relevant. Different object types support different subsets of the available set of object-dependent events. For example, a Picture object cannot have its associated data modified by end-user interaction.

The available set of object dependent event types are:

Object Dependent Event Description Event.Name value in Event Vector
Got Focus Caused by an object gaining the focus by any means "GotFocus"
Lost Focus (Always) Caused by an object losing the focus by any means "LostFocus"
Lost Focus (Modified) Caused by an object losing the focus by any means after its associated data has been modified. * "LostFocusModified"
Modified Caused by the modification, by any means, of the data associated to an object. * "Modified"
Click Caused by a mouse click on an object "Click"
Double-Click Caused by a double mouse click on an object "DoubleClick"
Right-Click Caused by a right mouse click on an object. For more information, see  RightClick "RightClick"
Closed Applicable only to Window object that have a system menu with an active Close option. It is associated with either a double mouse click on the window's system menu or the selection (by some means) of the window's system menu Close option. "Closed"
Back Android only: Caused by a click on the back button on Android devices. "Back"
  * Not applicable to object types that either have no associated data (e.g. a Window object), or whose associated data cannot be modified (e.g. Picture form field object)  


In ZimIDE, the CallBackEvents set of properties enables the selection of event types that can be made active for a particular object.
The dialog presents only those event types which the object type can support.
Note that menu items that do not have any child menu items support only the Click event, and they are always active for that event type.

When an event is made active for an object, the occurrence of that event causes either a FORM INPUT or a MENU INPUT command to terminate and execution control to pass to the next command in the executing program. In addition, the Event Vector Event is populated with information describing the event (cf. Event Vector).

The event properties Name, Type, and Tag are of particular importance for program execution control.

Event Property Description
Name The name of the event, as shown in the previous table: "GotFocus", "LostFocus", "LotFocusModified", "Modified", "Click", "DoubleClick", "RightClick", "Closed" or "Back",
Type The type of object that caused the event: "Window", "FormField" or "MenuItem".
Tag The tag associated with the object that caused the event. If blank, the object's Name is placed in the Tag field of the Event Vector Event