Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:2.00

Description

Description:

Adds an event handler to the given control. Multiple handlers can be assigned to the same event, an are executed in reverse order (the one added last is executed first).

Note: In order for multiple event handlers to work, the command string must return false (see Return values for details).

Reference List contains the full list of handler names, and further details on the event properties.

Syntax

Syntax:control ctrlAddEventHandler [event, command]
Parameters:
Return Value:Number - ID of the handler (to use with ctrlRemoveEventHandler), or -1, if the event handler could not be added.

Examples

Examples:
_ehId = _ctrl ctrlAddEventHandler ["MouseButtonDown","systemChat 'EH MouseButtonDown'"]

Additional Information

See also: ctrlSetEventHandler, ctrlRemoveAllEventHandlers, VBS User Interface Event Handlers, displayAddEventHandler
Multiplayer: 
Problems: 

Notes