Published event for ActiveX Toolkit lists

A published event is a named event that can be signaled from the list. Event names are case sensitive. All events are bound to Synergy subroutines using the AX_BIND subroutine and the list ID retrieved from L_STATUS. The OnOriginChange published event is supported.


The origin (upper left cell) has changed

WTSupported in traditional Synergy on Windows




xcall AX_BIND(axlist_id, "OnOriginChange"[, function])



The ID for the ActiveX Toolkit list. This ID can be retrieved with L_STATUS. (n)


(optional) A string that contains the name of the function to call when the event occurs. (a)


The OnOriginChange event is signaled when the origin (upper left cell) of the list is changed. When this happens, the specified Synergy function is called with five arguments passed: the ActiveX control ID, the previous top row, the previous left column, the new top row, and the new left column. See the function prototype example below:

function OnOriginChange, ^val, reentrant
    a_ctlid     ,n            ;ActiveX control ID
    a_oldrow    ,n            ;Previous top row
    a_oldcol    ,n            ;Previous left column
    a_newrow    ,n            ;New top row
    a_newcol    ,n            ;New left column

If the function argument is not passed, the bind to OnOriginChange is cleared.

Function is a function you name and write. The origin of the list can be modified by calling the AX_NEWVAL function and passing the argument you want to modify and its value, either by the new top or the new left. For example, the following modifies the declared a_newrow argument to the value 10.

xcall ax_newval(a_newrow, 10)

Any value returned from function is ignored.

See also



The following example prevents the first column in the list from being scrolled into view.

xcall l_status(listid, D_LAXCTRL, axctrl)
xcall ax_set(axctrl, "OriginColumn", 2)
xcall ax_bind(axctrl, "OnOriginChange", "my_origin_change")
function my_origin_change ,^val, reentrant
; Description:  Origin change event routine to prevent visibility
;               of column 1.
; Arguments:
      a_ctlid     ,n    ;ID of the control
      a_prevrow   ,n    ;Previous origin row
      a_prevcol   ,n    ;Previous origin column
      a_newrow    ,n    ;New origin row
      a_newcol    ,n    ;New origin column
; Return value:    TRUE
      if (a_newcol .le. 1)
        xcall ax_newval(a_newcol, 2)
      freturn TRUE