.. highlightlang:: us .. index:: OBJSetCallbackFunction .. _objsetcallbackfunction: OBJSetCallbackFunction ====================== .. us.tag OBJSetCallbackFunction NOTREADYENGLISH draw-callback Changed5503 :ref:`OBJSetCallbackFunction` sets a callback function for some events. .. function:: bool = OBJSetCallbackFunction(hObj, ssCallbackType, ssCallbackFunction) .. us.return **Return Value** Is TRUE (1), if the function was successful and otherwise FALSE (0). .. us.params **Parameters** .. uparam:: hObj Identifies the drawing object. .. uparam:: ssCallbackType *ssCallbackType* sets the type of callback function. The following events are supported: .. list-table:: :header-rows: 1 * - Type (String) - Description * - ObjectDblClickCallBack - Will be invoked if an object is double clicked (Diagram, Drawing Object) The function must have one parameter: ``cb(hObject)``. * - ObjectClickCallback - Will be invoked if an object is clicked (Diagram, Drawing Object) The function must have one parameter: ``cb(hObject)``. * - VideoPos - Will be invoked if a video is played). The function must have two parameters: ``cb(hVideo, pos)``. * - VideoMode - Will be invoked if a video is played. The function must have two parameters: ``cb(hVideo, mode)``. * - DragEnd - Will be invoked if an object has been dragged to a new position (Diagram, Drawing Object). The function must have one parameter: ``cb(hObject)``. * - SaveAs - Will be invoked if an IPW/IPZ document will be saved under a new name. The function must have one parameter: ``cb(hDoc, ssNewName)``. .. uparam:: ssCallbackFunction *ssCallbackFunction* is the callback function name. .. us.comment **Comment** An object can only have one callback function specified for each event. .. us.example **Example** :: OBJSetCallbackFunction(hCB, "ObjectDblClickCallBack", "OnLabelDataPointConfig"); .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2013.3 - New. .. seealso:: :ref:`overview-drawing-objects`, :ref:`OBJGetCallbackFunction`, :ref:`OBJRemoveCallbackFunction`, :ref:`AppOnCloseCallback` :sub:`id-40235`