This command doesn't work on map.
waitUntil { !isNull (findDisplay 12 displayCtrl 51) };
(findDisplay 12 displayCtrl 51) ctrlSetEventHandler ["MouseButtonDblClick", "hint str _this; true"]; // doesn't skip the marker dialog as it should.
Command in GUI Control - Event Handlers, Event Handlers
Also available as Markdown and JSON, or read the original wiki page.
Warning
This command is deprecated. Use ctrlAddEventHandler instead.
Caution
This information is obsolete. Use ctrlAddEventHandler instead as it can stack event handlers.
Sets given event handler of given control: any previously added event handler is removed.
Note
- See User Interface Event Handlers for the full list of handler names
- See also DIK KeyCodes for a list of key code constants relevant to key-related events like KeyDown and KeyUp
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').
controlName ctrlSetEventHandler [handlerName, function]
Parameters:
controlName: ControlhandlerName: Stringfunction: String - should return a Boolean indicating that the event has handled this event fully or not and whether the engine should execute its default code or not afterwardsReturns: Nothing
_control ctrlSetEventHandler ["KeyDown", ""];
(_display displayCtrl 108) ctrlSetEventHandler ["LBSelChanged","['ListChange',_this] call FireEvents"];
displaySetEventHandler · ctrlAddEventHandler · ctrlRemoveEventHandler · User Interface Event Handlers · DIK KeyCodes
This command doesn't work on map.
waitUntil { !isNull (findDisplay 12 displayCtrl 51) };
(findDisplay 12 displayCtrl 51) ctrlSetEventHandler ["MouseButtonDblClick", "hint str _this; true"]; // doesn't skip the marker dialog as it should.