ctrlRemoveEventHandler: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Some wiki formatting)
 
(46 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|version1= 1.00


|1.00|= Game version
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.50


| Remove a given event handler from the given control. |= Description
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| control '''ctrlRemoveEventHandler''' [handler name,id] |= Syntax
|game4= arma3
|version4= 0.50


|p1= control: [[Control]] - |= PARAMETER1
|gr1= GUI Control - Event Handlers
|gr2= Event Handlers


|p2= [handler name,id]: [[Array]] -  |= PARAMETER2
|descr= Remove a given event handler from the given control.


|p3= |= PARAMETER3
|s1= control [[ctrlRemoveEventHandler]] [type, id]


| Nothing |= RETURNVALUE
|p1= control: [[Control]]


|p2= type: [[String]]


|x1= <code>_map [[ctrlRemoveEventHandler]] ["Draw", _id];</code>|= EXAMPLE1
|p3= id: [[Number]]


____________________________________________________________________________________________
|r1= [[Nothing]]


| [[ctrlAddEventHandler]], [[ctrlRemoveAllEventHandlers]] |= SEEALSO
|x1= <sqf>_map ctrlRemoveEventHandler ["Draw", _id];</sqf>


| |= MPBEHAVIOUR
|seealso= [[ctrlAddEventHandler]] [[ctrlRemoveAllEventHandlers]]
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on February 9, 2016 - 01:54 (UTC)</dd>
<dt class="note">[[User:Pierre MGI|Pierre MGI]]</dt>
<dd class="note">
A "remove" command doesn't delete the attached handle. Handle stays as a variable (local or global in its name space).
If you need to erase all traces of a CtrlEH, use this command then your_handle = nil;
In this way, you can toggle on/off your EH's, with add/remove, without weird result due to a forgotten handle.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 01:04, 8 August 2022

Hover & click on the images for description

Description

Description:
Remove a given event handler from the given control.
Groups:
GUI Control - Event HandlersEvent Handlers

Syntax

Syntax:
control ctrlRemoveEventHandler [type, id]
Parameters:
control: Control
type: String
id: Number
Return Value:
Nothing

Examples

Example 1:
_map ctrlRemoveEventHandler ["Draw", _id];

Additional Information

See also:
ctrlAddEventHandler ctrlRemoveAllEventHandlers

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