OnItemSelect picture event


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

Special handler:
 ENTRY XXX_OnItemSelect
 ; script actions
 END XXX_OnItemSelect
Parameters
_refIdParameter of the INT type (required for global handler).
XXXName of Reference variable connected to graphic object (without the character "_").
Description
The picture event is being generated when the user changes currently selected line of Windows control of List box type or displayer of the Browser type.
Example
Special picture event handler:

; picture event handler: Change of selected line in the list
 ; with reference variable_List assigned
ENTRY List_OnItemSelect
  ; script actions
 END List_OnItemSelect

Global picture event handler:

; picture events handler: Change of selected line in all lists and 
; displayers of Browser type that have no special handler defined
ENTRY OnItemSelect(IN  INT _refId)
; _refId - value of Reference local variable assigned to graphic object
   IF _refId = _List THEN ; test that determines where selected line was changed
    ; script actions  
  ENDIF
 END OnItemSelect
Note
If both the handlers are defined in picture script, the global handler will never be called for _refId=List, because a special handler is already defined.
Napíšte komentár