Arma 3 Scripting

Command in GUI Control

createDisplay

Also available as Markdown and JSON, or read the original wiki page.

Description

Creates child display of given display and loads from "resourceName". The notable difference between createDisplay and createDialog is that with createDisplay the player would be able to move around while the display is shown.

Displays created with createDisplay or createDialog will take control of the mouse pointer and will close when user presses Esc.

Note

Arma 3: Since Arma 3 v1.50 createDisplay returns Display and will first look in description.ext for resourceName config, if not found, it will then look in main config.

Note

If an overlay is needed instead, use cutRsc.

Syntax

parent createDisplay resourceName

Parameters:

Returns: Display (since Arma 3 v1.50, Nothing before)

Examples

Example 1

findDisplay 46 createDisplay "RscCredits";

Example 2

// creates an empty display
private _emptyDisplay = findDisplay 46 createDisplay "RscDisplayEmpty";

See also

closeDisplay · createDialog · displayCtrl · dialog · displayNull · controlNull · ctrlCreate · displayParent

Community notes

MrPineapple

When using createDisplay instead of createDialog, all the commands for working with the controls of the display only work with the control version, not the IDC version:

lbAdd [1234, "item"];    // does not work on displays, and won't error either
_ctrl lbAdd "item";        // does work with displays

So you have to use the control(DisplayCtrl) and not the IDC.

Target_practice

Creating a display with the same parent as an existing display will destroy the latter and all of its children. However, their onUnload, onChildDestroyed, and onDestroy event handlers will not fire.

7erra

When trying to create a display with createDisplay on a non existing display the command will fail silently and return displayNull.