ctrlCreate: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(dupe)
No edit summary
Line 54: Line 54:
<dd class="note">
<dd class="note">
"RscListBox" created via ctrlCreate is buggy, you can only select the first seven items.
"RscListBox" created via ctrlCreate is buggy, you can only select the first seven items.
</dd>
</dl>
<!-- DISCONTINUE Notes -->
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on February 6, 2016 - 20:58 (UTC)</dd>
<dt class="note">[[User:DreadedEntity|DreadedEntity]]</dt>
<dd class="note">
Buttons created using [[ctrlCreate]] ("RscButton"), always close the current dialog. Resetting the action using [[buttonSetAction]] and returning true/false makes no difference.<br>
One workaround to this is to set the button's action using [[buttonSetAction]], and in addition to other code, place commands to open your dialog again.<br>
'''Note:''' Setting a button's action will not override it closing your dialog, but if you open it again in the button's action code, it opens fast enough that the user might not notice.<br>
Look at the Discussion section for this page for more information.
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Revision as of 22:58, 6 February 2016

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 existing 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:
allControlsallDisplayscontrolsGroupCtrlctrlDeletectrlModelctrlSetModelctrlPositionctrlSetPositionctrlClassNamectrlModelScalectrlSetModelScalectrlModelDirAndUpctrlSetModelDirAndUp

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 December 30, 2015 - 01:48 (UTC)
Molaron
"RscListBox" created via ctrlCreate is buggy, you can only select the first seven items.
Posted on February 6, 2016 - 20:58 (UTC)
DreadedEntity
Buttons created using ctrlCreate ("RscButton"), always close the current dialog. Resetting the action using buttonSetAction and returning true/false makes no difference.
One workaround to this is to set the button's action using buttonSetAction, and in addition to other code, place commands to open your dialog again.
Note: Setting a button's action will not override it closing your dialog, but if you open it again in the button's action code, it opens fast enough that the user might not notice.
Look at the Discussion section for this page for more information.