From Bohemia Interactive Community
Hover & click on the images for description
Description
Description:
Creates a new control in the given display.
The control class could be an existing class from the main config or a custom class defined in the mission config .
The main config is searched first, if the class does not exist there, the mission config is searched.
Some of the common controls defined in the main config that can be used with this command:
Show list
Class
Description
Available since
RscText
simple text box
RscStructuredText
text box which supports structured text
RscTextMulti
simple multiline text box
RscPicture
simple picture box
RscPictureKeepAspect
picture box that doesn't stretch picture
RscEdit
input box
RscEditMulti
multiline input box
RscEditReadOnly
input box with canModify = false;
1.98
RscEditMultiReadOnly
multiline input box with canModify = false;
1.98
RscTree
tree view control
RscTreeMulti
multi-select tree view
2.02
RscTreeSearch
searchable tree view control (see Example 4)
RscVideo
picture control with autostart for video texture (see BIS_fnc_playVideo )
RscVideoKeepAspect
picture control for video to keep original video aspect ratio
RscButtonMenuBIKI
shortcut button with url pointing to "https://community.bistudio.com/wiki/ "
1.98
RscControlsGroup
default controls group
RscControlsGroupNoScrollbars
controls group without scrollbars
RscControlsGroupNoHScrollbars
controls group without horizontal scrollbar
RscControlsGroupNoVScrollbars
controls group without vertical scrollbar
↑ Back to spoiler's top
Groups:
GUI Control
Syntax
Syntax:
display ctrlCreate [class, idc, controlsGroup] Parameters:
display: Display - display in which control will be created
class: String or 2.14 Config - existing classname (see ctrlCreate/classnames ) of the new control; 1.70 it is possible to use classes defined in mission config
idc: Number - IDC of the new control. Use -1 if not needed
⚠
Be careful when setting the IDC to
-1 if the GUI also contains a
CT_LISTNBOX since
idcLeft and
idcRight by default have
idc = -1 ;
.
controlsGroup: Control - (Optional, default controlNull ) creates controls in existing controls group Return Value:
Control
Examples
Example 1: Copy _display ctrlCreate [ "RscText" , 1234 ] ;
Example 2: Example 3: Example 4: Create Tree View control with search. Available RscTreeSearch class is hardcoded to be used with RscEdit with idc 645 .
Example below demonstrates how to. After tree is generated, try typing something in the top box.
Example 5: Create a simple submit edit box and show content in hint:
Example 6: Example 7: Example 8:
Additional Information
See also:
ctrlMapSetPosition allControls allDisplays controlsGroupCtrl ctrlDelete ctrlModel ctrlSetModel ctrlPosition ctrlSetPosition ctrlClassName ctrlModelScale ctrlSetModelScale ctrlModelDirAndUp ctrlSetModelDirAndUp displayParent
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