ctrlCreate: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) mNo edit summary |
Killzone Kid (talk | contribs) (controls examples) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Creates new control in given display. |= Description | | Creates new control in given display. Some of the common controls that can be used with this command: | ||
* <tt>RscText</tt> - simple text box | |||
* <tt>RscTextMulti</tt> - simple multiline text box | |||
* <tt>RscPicture</tt> - simple picture box | |||
* <tt>RscPictureKeepAspect</tt> - picture box that doesn't stretch picture | |||
* <tt>RscEdit</tt> - input box | |||
* <tt>RscEditMulti</tt> - multiline input box | |||
* <tt>RscTree</tt> - tree view control | |||
* <tt>RscTreeSearch</tt> - searchable tree view control | |||
* <tt>RscVideo</tt> - picture control with autostart for video texture | |||
* <tt>RscVideoKeepAspect</tt> - picture control for video to keep original video aspect ratio |= Description | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 16:44, 2 March 2017
Description
- Description:
- Creates new control in given display. Some of the common controls that can be used with this command:
- RscText - simple text box
- RscTextMulti - simple multiline text box
- RscPicture - simple picture box
- RscPictureKeepAspect - picture box that doesn't stretch picture
- RscEdit - input box
- RscEditMulti - multiline input box
- RscTree - tree view control
- RscTreeSearch - searchable tree view control
- RscVideo - picture control with autostart for video texture
- RscVideoKeepAspect - picture control for video to keep original video aspect ratio
- Groups:
- Uncategorised
Syntax
- Syntax:
- display ctrlCreate [class, idc, controlsGroup]
- Parameters:
- display: Display - Display in which control will be created
- [class, idc, controlsGroup]: Array
- 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