ctrlAddEventHandler: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| control '''ctrlAddEventHandler''' [handler name,function] |= Syntax
| control '''ctrlAddEventHandler''' [handler,function] |= Syntax


|p1= control: [[Control]] |= PARAMETER1  
|p1= control: [[Control]] |= PARAMETER1  


|p2= [handler name,function]: [[Array]] - |= PARAMETER2  
|p2= [handler,function]: [[Array]]  |= PARAMETER2  


|p3= |= PARAMETER3  
|p3= handler: [[String]] - handler name|= PARAMETER3  
|p4= function: [[String]] - script|= PARAMETER4


| [[Number]] |= RETURNVALUE  
| [[Number]] |= RETURNVALUE  




|x1= <code>(example)</code>|= EXAMPLE1  
|x1= <code>_map [[ctrlAddEventHandler]] ["draw","_this call BIS_fnc_strategicMapOpen_draw"];</code>|= EXAMPLE1  


____________________________________________________________________________________________
____________________________________________________________________________________________

Revision as of 20:52, 10 September 2013

Hover & click on the images for description

Description

Description:
Add an event handler to the given control. Returns id of the handler or -1 when failed.
Groups:
Uncategorised

Syntax

Syntax:
control ctrlAddEventHandler [handler,function]
Parameters:
control: Control
[handler,function]: Array
handler: String - handler name
function: String - script
Return Value:
Number

Examples

Example 1:
_map ctrlAddEventHandler ["draw","_this call BIS_fnc_strategicMapOpen_draw"];

Additional Information

See also:
displayAddEventHandler

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section