4D v18

FORM Event

Home

 
4D v18
FORM Event

FORM Event 


 

FORM Event -> Function result 
Parameter Type   Description
Function result  Object in Event object

FORM Event returns an object containing information about the form event that has just occurred. Usually, you will use FORM Event from within a form or object method.

 

Returned object

Each returned object includes the following main properties:

 

PropertyTypeDescription
objectNametextName of the object triggering the event - Not included if the event is triggered by the form
codelongintNumeric value of the form event. See Form event code
descriptiontextName of the form event (e.g. "On After Edit").

For example, in the case of a click on a button, the object contains the following properties:

{
"code":4,
"description":"On Clicked",
"objectName":"Button2"
}

The event object can contain additional properties, depending on the object for which the event occurs. For example, eventObj objects generated on 4D View Pro areas return additional properties, such as row, column, or sheetArea (cf. 4D View Pro form events). 

Note: If there is no current event, FORM Event returns a null object.

Example  

You want to handle the On Clicked event on a button:

 If(FORM Event.code=On Clicked)
    ...
 End if



See also 

Form event code

 
PROPERTIES 

Product: 4D
Theme: Form Events
Number: 1606

This command can be run in preemptive processes

 
HISTORY 

New
Created: 4D v18

 
ARTICLE USAGE

4D Language Reference ( 4D v18)