OnSubPictureClosed picture event


Declaration

ENTRY OnSubPictureClosed(IN ALIAS _pictureRef)
 ; script actions
 END OnSubPictureClosed

or

ENTRY OnSubPictureClosed(IN ALIAS _pictureRef, IN INT _instanceId)
 ; script actions
 END OnSubPictureClosed


Parameters
_pictureRef Required parameter of ALIAS type.
_instanceID Instance ID of the closed picture.

Description
The picture is being generated after closing the picture, that was opened as a subpicture of current picture (e.g. the action OPEN DIRECT) and next passing input-output parameters. The closed picture is defined by the parameter _schemeRef that is initialized as a reference to the picture. 

The picture event can be used when you need to react to a change of picture input-output parameters, which are influenced by closing a picture.

For the second type of the declaration, there is also known the instance ID of the closed picture.


Example
; picture event handler:  OnSubPictureClosed
ENTRY  OnSubPictureClosed(IN ALIAS _schemeRef)
   IF _schemeRef\HBJ = S.SubPicture\HBJ THEN
    ; the subpicture S.SubPicure that was opened by
     ; the event handler BtnOK_OnClick is now closed
    ; If the subpicture S.SubPicture contains input-output variables,
     ; their values are to be passed to current picture
  ENDIF
 END  OnSubPictureClosed

; picture event handler: Pressing a mouse button
ENTRY BtnOK_OnClick
  ; opening the subpicture
     OPEN S.SubPicture DIRECT
 END BtnOK_OnSubPictureClosed 

Napíšte komentár