Arma 3 Scripting

ctrlSetEventHandler

  • Deprecated
  • Arma 3 v0.50
  • First in Armed Assault v1.00

Command · also in Event Handlers · Markdown · JSON · original wiki page

Warning

This command is deprecated. Use ctrlAddEventHandler instead.

Description

Caution

This information is obsolete as of Arma 2 v1.00. Reason: Use ctrlAddEventHandler instead as it can stack event handlers.

Sets given event handler of given control: any previously added event handler is removed.

Note

Important

When using the event names listed here with the ctrlAddEventHandler, ctrlSetEventHandler, displayAddEventHandler or displaySetEventHandler commands, the prefix "on" in the event name must be removed (e.g. 'ButtonDown' instead of 'onButtonDown').

Syntax

controlName ctrlSetEventHandler [handlerName, function]

Parameters:

Returns: Nothing

Examples

Example 1

_control ctrlSetEventHandler ["KeyDown", ""];

Example 2

(_display displayCtrl 108) ctrlSetEventHandler ["LBSelChanged","['ListChange',_this] call FireEvents"];

See also

displaySetEventHandler · ctrlAddEventHandler · ctrlRemoveEventHandler · User Interface Event Handlers · DIK KeyCodes

Community notes