ENTRY OnClick(IN INT _refId)
; script actions
END OnClick
Special handler:
ENTRY XXX_OnClick
; script actions
END XXX_OnClick
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 by left-clicking the graphic object
(for Windows control of
Tab control
type, the picture event is being generated when switching between tabs.
The picture event is also generated when given tab was
removed (made invisible) using the function
HI_SetVisible
(actually, the user selected another tab) -
there is generated the picture vent for the first visible tab from the left.
Windows controls of List box and Spin
button types do not generate the picture event and therefore the special handler
is not allowed for them.
Example
Special picture event handler:
; picture event handler: Clicking the graphic object
; with reference variable_BtnOK assigned
ENTRY BtnOK_OnClick
%HI_ClosePicture() ; closing picture
END BtnOK_OnClick
Global picture event handler:
; picture events handler: Clicking on graphic objects
; that has no special handler defined
ENTRY OnClick(IN INT _refId)
; _refId - value of reference local variable assigned to graphic object
IF _refId = _BtnOK THEN ; test, that determines the graphic object
; the user clicked on
%HI_ClosePicture() ; closing picture
ENDIF
END OnClick
Note
If both the handlers are defined in picture
script, the global handler will never be called for _refId=_BtnOK,
because a special handler is already defined.
Pridať komentár