4D v17

On VP Ready form event

Home

 
4D v17
On VP Ready form event

On VP Ready form event  


 

 

Any 4D View Pro area initialization code, for loading or reading values from or in the area, must be located in the On VP Ready form event of the area. This Form event is triggered once the area loading is complete. Testing this event makes you sure that the code will be executed in a valid context. An error is returned if a 4D View Pro command is called before the On VP Ready form event is generated.

Note: 4D View Pro areas are loaded asynchronously in 4D forms. It means that the standard On load form event cannot be used for 4D View Pro initialization code, since it could be executed before the loading of the area is complete. On VP Ready is always generated after On load.

To insert initialization code for a 4D View Pro area:

  1. Check the On VP Ready event for the 4D View Pro area in the Property list:

  2. Write the 4D View Pro area initialization code in the On VP Ready event:

      //form method or area object method
     Case of
        :(Form event=On VP Ready)
           ... //initialization code
     End case

 
PROPERTIES 

Product: 4D
Theme: 4D View Pro Language

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D View Pro Reference ( 4D v17)