OnUserInput picture event


Declaration
Global handler:
 ENTRY OnUserInput(IN INT _refId)
 ; script actions
 END OnUserInput

Special handler:
 ENTRY XXX_OnUserInput
 ; script actions
 END XXX_OnUserInput

Parameters
_refId Parameter of INT type (required for global handler).
XXX Name of Reference variable connected to graphic object (without the character "_").

Description
The picture event is being generated after closing the control window opened by clicking any graphic object or Windows control of Push button type.

If a graphic object not connected with given reference  variable closes a control window, it will activate the global handler of the picture event OnUserInput and the value of the parameter _refId will be 0.


Example
Special picture event handler:

 
; picture event handler: Closing the control window of the graphic object
; with reference variable _entry assigned
ENTRY entry_OnUserInput
   ...
END entry_OnUserInput

 
Global picture event handler:
 
; picture events handler: Closing the control window of a graphic object
 ; with no defined special handler of the picture event
ENTRY OnUserInput(IN  INT _refId)
; _refId - value of reference local variable assigned to graphic object
   IF _refId = _entry THEN ; test that determines above which graphic object 
                          ; the control window was closed
     ... 
 ELSIF _refId = 0 THEN 
   ; there were closed the control window of graphic object with  
   ; no defined reference variable  
  ENDIF
 END OnUserInput

Note
If both the handlers are defined in picture script, the global handler will never be called for _refId=_entry, because a special handler is already defined.

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .