ctrlCreate: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(moving note to talk)
(format)
Line 12: Line 12:
| display '''ctrlCreate''' [class, idc, controlsGroup] |= Syntax
| display '''ctrlCreate''' [class, idc, controlsGroup] |= Syntax


|p1= display : [[Display]]  |= PARAMETER1  
|p1= display: [[Display]] - Display in which control will be created |= PARAMETER1  


|p2= class: [[String]] - Existing classname (see [[ctrlCreate/classnames]]) of the new control (currently only [[configFile]] classes are supported) |= PARAMETER2  
|p2= class: [[String]] - Existing classname (see [[ctrlCreate/classnames]]) of the new control (currently only [[configFile]] classes are supported) |= PARAMETER2  


|p3= idc: [[Number]] - IDC of the new control |= PARAMETER3
|p3= idc: [[Number]] - IDC of the new control (use -1 if you don't care what it should be) |= PARAMETER3


|p4= controlsGroup: [[Control]] - (Optional) Since Arma 3 v1.33.127680, it is possible to create controls in existing controls groups. |= PARAMETER3
|p4= controlsGroup (Optional): [[Control]] - Creates controls in existing controls group |= PARAMETER3


| [[Control]] |= RETURNVALUE  
| [[Control]] |= RETURNVALUE  

Revision as of 20:35, 1 March 2017

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 - Display in which control will be created
class: String - Existing classname (see ctrlCreate/classnames) of the new control (currently only configFile classes are supported)
idc: Number - IDC of the new control (use -1 if you don't care what it should be)
controlsGroup (Optional): Control - Creates controls in existing controls group
Return Value:
Control

Examples

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

Additional Information

See also:
allControlsallDisplayscontrolsGroupCtrlctrlDeletectrlModelctrlSetModelctrlPositionctrlSetPositionctrlClassNamectrlModelScalectrlSetModelScalectrlModelDirAndUpctrlSetModelDirAndUpdisplayParent

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


Posted on February 6, 2016 - 20:58 (UTC)
DreadedEntity
Although you can only dynamically create controls using BIS's configs, there are many commands to change certain aspects of each created control. See GUI Control