ctrlCreate: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
(controlsGroup param)
Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| display '''ctrlCreate''' [class, idc] |= Syntax
| display '''ctrlCreate''' [class, idc, controlsGroup] |= Syntax


|p1= display : [[Display]]  |= PARAMETER1  
|p1= display : [[Display]]  |= PARAMETER1  
Line 17: Line 17:


|p3= idc: [[Number]] - IDC of the new control  |= PARAMETER3
|p3= idc: [[Number]] - IDC of the new control  |= PARAMETER3
|p4= controlsGroup: [[Control]] - (Optional) Since Arma 3 v1.33.127680, it is possible to create controls in controls groups. |= PARAMETER3


| [[Control]] |= RETURNVALUE  
| [[Control]] |= RETURNVALUE  
Line 23: Line 25:
|x1= <code>_display [[ctrlCreate]] ["RscText", 1234];</code>|= EXAMPLE1  
|x1= <code>_display [[ctrlCreate]] ["RscText", 1234];</code>|= EXAMPLE1  
|x2= <code>_map = [[findDisplay]] 46 [[ctrlCreate]] ["RscMapControl", -1];</code>|= EXAMPLE2
|x2= <code>_map = [[findDisplay]] 46 [[ctrlCreate]] ["RscMapControl", -1];</code>|= EXAMPLE2
|x3= <code>myControl = [[findDisplay]] 0 [[ctrlCreate]] ["RscText", 1234, [[findDisplay]] 0 [[displayCtrl]] 2300];</code>|= EXAMPLE3
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 17:36, 10 October 2014

Hover & click on the images for description

Description

Description:
Creates new control in given display.
Groups:
Uncategorised

Syntax

Syntax:
display ctrlCreate [class, idc, controlsGroup]
Parameters:
display : Display
class: String - Existing classname (see ctrlCreate/classnames) of the new control (currently only configFile classes are supported)
idc: Number - IDC of the new control
controlsGroup: Control - (Optional) Since Arma 3 v1.33.127680, it is possible to create controls in controls groups.
Return Value:
Control

Examples

Example 1:
_display ctrlCreate ["RscText", 1234];
Example 2:
_map = findDisplay 46 ctrlCreate ["RscMapControl", -1];
Example 3:
myControl = findDisplay 0 ctrlCreate ["RscText", 1234, findDisplay 0 displayCtrl 2300];

Additional Information

See also:
ctrlDeletectrlModelctrlSetModelctrlPositionctrlSetPositionctrlClassNamectrlModelScalectrlSetModelScalectrlModelDirAndUpctrlSetModelDirAndUp

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