Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

OnClick picture event


Declaration
Global handler:


Blok kódu
languageesl
themeConfluence
 ENTRY OnClick(IN INT _refId)
 ; script actions
 END OnClick

Special handler:
Blok kódu
languageesl
themeConfluence
 ENTRY XXX_OnClick
  ;   script actions
 END XXX_OnClick
Parameters


_refIdParameter of INT type (required for global handler).
XXXName 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:
 


Blok kódu
languageesl
themeRDark
; picture event handler: Clicking the graphic object
 ; with reference variable_BtnOK assigned


Blok kódu
languageesl
themeRDark
ENTRY BtnOK_OnClick
   %HI_ClosePicture() ; closing picture
 END BtnOK_OnClick
 
Global picture event handler:
 


Blok kódu
languageesl
themeRDark
; picture events handler: Clicking on graphic objects
 ; that has no special handler defined


Blok kódu
languageesl
themeRDark
ENTRY OnClick(IN  INT _refId)


Blok kódu
languageesl
themeRDark
; _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.

Info
titleRelated pages:

Picture event handler
Picture event