OnGraphBtnClick picture event


Declaration
Global handler:
 ENTRY   OnGraphBtnClick(IN INT _refId, IN INT _LineNr)
 ; script actions
 END    OnGraphBtnClick

Special handler:
 ENTRY XXX_OnGraphBtnClick(IN INT _LineNr) 
 ; script actions
 END XXX_OnGraphBtnClick

Parameters
_refId Required input parameter of INT type for global handler.
XXX Name of the reference variable assigned to graphic object (without the character "_").
_LineNr Serial number of the graphic flow, the button of which was pressed.

Description
The picture event is being generated when clicking given user button placed in the graph area.
Example
Special picture event handler:

 
 ; picture event handler: clicking the user button in
 ; the displayer of Graph type with reference variable GRAPH assigned
ENTRY GRAPH_OnGraphBtnClick(IN  INT _LineNr) 
  ; actions
 END GRAPH_OnGraphBtnClick 

 
Global picture event handler:
 
 ; picture events handler: Clicking the user button in displayers of Graph type
; that have no special picture event handler defined
ENTRY OnGraphBtnClick (IN  INT _refId, IN  INT _LineNr)
; _refId - value of reference variable that assigned graphic object
   IF _refId = _GRAPH THEN ; test that checks the displayer, where the picture event occurred  
   ; actions
  ENDIF
 END OnGraphBtnClick 

Note
If both the handlers are defined in picture script, global handler will never be called for _refId=_List, because the special handler is already defined.
Napíšte komentár