# GUI Control (scripting commands)

- [activeTitleEffectParams](../../commands/activeTitleEffectParams.md): Returns type, effect, speed and map visibility of the given active title effect (see allActiveTitleEffects)
- [allActiveTitleEffects](../../commands/allActiveTitleEffects.md): Returns a list of all layers that have currently active title effect. Numbers equal to or greater than 0 represent cut layers, where as -1 represents title layer (see Title Effect Type).
- [allControls](../../commands/allControls.md): Returns a list of all controls in the provided display or controls group, including "sub"-controls from other CT_CONTROLS_GROUPs.
- [allCutLayers](../../commands/allCutLayers.md): Returns all named layers used by cutRsc, cutText, cutObj or cutFadeOut. The layer normally would be added on the first use of any of the aforementioned commands, however if a layer needs to be reserved it could be done…
- [allDisplays](../../commands/allDisplays.md): Returns a list of all opened GUI displays.
- [buttonAction](../../commands/buttonAction.md): Returns the action assigned to a control of the currently active user dialog. Can be used for buttons and active texts. Read Arma: GUI Configuration for more information about user dialogs and controls.
- [buttonSetAction](../../commands/buttonSetAction.md) **[deprecated]**: Set the action of a control of the currently active user dialog. The script statement is executed on button release and `_this` is available, but contains ""; See Arma: GUI Configuration for more information about user…
- [cbChecked](../../commands/cbChecked.md): Returns the current state of a CT_CHECKBOX control.
- [cbSetChecked](../../commands/cbSetChecked.md): Sets the current state of a CT_CHECKBOX control. Use `"CheckedChanged"` control event handler with it.
- [closeDialog](../../commands/closeDialog.md): Closes the currently active dialog with exit code. It does not instantly close the dialog but does it on next simulation cycle. Most common exit codes are:
- [closeDisplay](../../commands/closeDisplay.md): Closes given display with exit code. It does not instantly close the display but does it on next simulation cycle. Most common exit codes are:
- [controlNull](../../commands/controlNull.md): A non-existing Control. To compare non-existent objects use isNull or isEqualTo (see examples).
- [controlsGroupCtrl](../../commands/controlsGroupCtrl.md): Returns a child control with specified idc from a controls group
- [createDialog](../../commands/createDialog.md): Creates a dialog which is defined either in the mission's description.ext, in the campaign's description.ext or in the global resource.cpp. The given name has to be the class name used in one of these files.
- [createDisplay](../../commands/createDisplay.md): 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…
- [createGearDialog](../../commands/createGearDialog.md): Opens gear dialog for given unit.
- [createMissionDisplay](../../commands/createMissionDisplay.md): Create single missions display as a child of given display. The mission dialog will be set to the directory given as an argument "root".
- [createMPCampaignDisplay](../../commands/createMPCampaignDisplay.md): Create a MP campaign display. The class name must be a mission collection declared in the configs; for example, `configFile >> "CfgMissions" >> "MPMissions" >> "Apex"`
- [ctrlActivate](../../commands/ctrlActivate.md): Launches action attached to given (button based) control. Command ignores control disabled state. (Example 2).
- [ctrlAt](../../commands/ctrlAt.md): Returns the control at the specified coordinates.
- [ctrlAutoScrollDelay](../../commands/ctrlAutoScrollDelay.md): Returns number of seconds auto-scroll will wait before scroll and/or rewind. -2 if scrollbar not present.
- [ctrlAutoScrollRewind](../../commands/ctrlAutoScrollRewind.md): Returns true if auto-scroll should move back to start after it reaches the end.
- [ctrlAutoScrollSpeed](../../commands/ctrlAutoScrollSpeed.md): Returns number of seconds to auto-scroll one line. -1 if auto-scroll is disabled. -2 if scrollbar not present.
- [ctrlBackgroundColor](../../commands/ctrlBackgroundColor.md): Returns control's background color.
- [ctrlChecked](../../commands/ctrlChecked.md): Returns the current state of given CT_CHECKBOXES control. Since Arma 3 v1.72 it is possible to query multiple checkboxes by providing checkbox index. For more information see CT_CHECKBOXES.
- [ctrlClassName](../../commands/ctrlClassName.md): Returns the class name of a Control as it is defined in config. If you need config class of a game created Display, it is stored on display itself:
- [ctrlCommit](../../commands/ctrlCommit.md): Commits control animation to last specified duration.
- [ctrlCommitted](../../commands/ctrlCommitted.md): Check if the control animation is finished.
- [ctrlCreate](../../commands/ctrlCreate.md): Creates a new control in the given display.
- [ctrlDelete](../../commands/ctrlDelete.md): Deletes given control. The control has to be created either by script with ctrlCreate or to have `deletable` property in config set to 1.
- [ctrlEnable](../../commands/ctrlEnable.md): Enables or disables a control of the currently active user dialog. Disabled controls cannot be clicked onto. Read Arma: GUI Configuration for more information about user dialogs and controls.
- [ctrlEnabled](../../commands/ctrlEnabled.md): Returns if a control on the currently active user dialog is enabled. Disabled controls cannot be focused. Read Arma: GUI Configuration for more information about user dialogs and controls.
- [ctrlFade](../../commands/ctrlFade.md): Returns the current fade factor of control.
- [ctrlFontHeight](../../commands/ctrlFontHeight.md): Returns control's font size, usually `sizeEx` value (see ctrlSetFontHeight).
- [ctrlForegroundColor](../../commands/ctrlForegroundColor.md): Returns control's foreground color.
- [ctrlGetProperty](../../commands/ctrlGetProperty.md): Returns one or multiple given properties of given control.
- [ctrlIDC](../../commands/ctrlIDC.md): Returns control IDC.
- [ctrlIDD](../../commands/ctrlIDD.md): Returns display IDD.
- [ctrlParent](../../commands/ctrlParent.md): Returns the parent Display of the given control. For parent Controls group see ctrlParentControlsGroup.
- [ctrlParentControlsGroup](../../commands/ctrlParentControlsGroup.md): Returns the parent control of a given child control. If the control is not part of a CT_CONTROLS_GROUP control then controlNull is returned. To return parent Display of the control use ctrlParent.
- [ctrlScrollValues](../../commands/ctrlScrollValues.md): Returns scroll values for current scrollbars in range 0...1 (-1 if not applicable) for the following controls: - CT_CONTROLS_TABLE - CT_CONTROLS_GROUP - CT_TREE - CT_LISTBOX - CT_COMBO - CT_XCOMBO - CT_LISTNBOX -…
- [ctrlSetActiveColor](../../commands/ctrlSetActiveColor.md): Sets text color of given control when it is selected.
- [ctrlSetAngle](../../commands/ctrlSetAngle.md): Sets the rotation of a control set as `ST_PICTURE`. Rotation will be done within the control boundaries, so if the X and Y are given off center, the picture may get clipped by the control boundaries.
- [ctrlSetAutoScrollDelay](../../commands/ctrlSetAutoScrollDelay.md): Sets number of second before auto-scroll starts/rewinds. Setter for ctrlAutoScrollDelay.
- [ctrlSetAutoScrollRewind](../../commands/ctrlSetAutoScrollRewind.md): Defines if scroll should rewind when auto-scroll reach end. Setter for ctrlAutoScrollRewind.
- [ctrlSetAutoScrollSpeed](../../commands/ctrlSetAutoScrollSpeed.md): Sets number of second required to scroll to next line. If speed < 0, auto-scroll is disabled. Setter for ctrlAutoScrollSpeed.
- [ctrlSetBackgroundColor](../../commands/ctrlSetBackgroundColor.md): Sets background color of given control. Only affects: - CT_COMBO - CT_STATIC - CT_STRUCTURED_TEXT - CT_MAP - CT_MAP_MAIN - Arma 3 v2.02 CT_BUTTON - Arma 3 v2.02 CT_SHORTCUTBUTTON - Arma 3 v2.02 CT_ACTIVETEXT
- [ctrlSetChecked](../../commands/ctrlSetChecked.md): Sets checked state of a CT_CHECKBOXES control.
- [ctrlSetDisabledColor](../../commands/ctrlSetDisabledColor.md): Sets the colorDisabled attribute of a control.
- [ctrlSetFade](../../commands/ctrlSetFade.md): Sets wanted transparency for control animation. Requires ctrlCommit to commit changes. To hide or show a control instantly, use ctrlShow.
- [ctrlSetFocus](../../commands/ctrlSetFocus.md): Sets the input focus on given control.
- [ctrlSetFont](../../commands/ctrlSetFont.md): Sets the font for given control (see available fonts)
- [ctrlSetFontHeightSecondary](../../commands/ctrlSetFontHeightSecondary.md): Sets the font size of the secondary text of given control.
- [ctrlSetFontSecondary](../../commands/ctrlSetFontSecondary.md): Sets the font size of the secondary text of given control.
- [ctrlSetForegroundColor](../../commands/ctrlSetForegroundColor.md): Sets foreground color of the given control.
- [ctrlSetProperty](../../commands/ctrlSetProperty.md): Sets one or multiple given properties of given control.
- [ctrlSetScrollValues](../../commands/ctrlSetScrollValues.md): Sets scroll values for current scrollbars in range 0..1 for the following controls: - CT_CONTROLS_TABLE - CT_CONTROLS_GROUP - CT_TREE - CT_LISTBOX - CT_COMBO - CT_XCOMBO - CT_LISTNBOX - CT_LISTNBOX_CHECKABLE
- [ctrlSetShadow](../../commands/ctrlSetShadow.md): Sets 'shadow' property of the control: - 0 - no shadow - 1 - shadow - 2 - outline
- [ctrlSetStructuredText](../../commands/ctrlSetStructuredText.md): Set the Structured Text which will be displayed in structured text control.
- [ctrlSetText](../../commands/ctrlSetText.md): Sets the text of a control of the currently active user dialog or display. This command can be used for static texts, buttons, edit lines and active texts as well as for images, where you can use it to set the image…
- [ctrlSetTextColor](../../commands/ctrlSetTextColor.md): Sets text color of given control. As of Arma 3 v1.40 this command can also be used to change fill-color of a CT_PROGRESS control.
- [ctrlSetTextColorSecondary](../../commands/ctrlSetTextColorSecondary.md): Sets the secondary text color of a text control.
- [ctrlSetTextSecondary](../../commands/ctrlSetTextSecondary.md): Sets the secondary text of a text control.
- [ctrlSetTextSelection](../../commands/ctrlSetTextSelection.md): Selects `length` characters of edit control from the `start` position and places cursor at the end of selection.
- [ctrlSetTooltip](../../commands/ctrlSetTooltip.md): Sets tooltip text of given control.
- [ctrlSetTooltipColorBox](../../commands/ctrlSetTooltipColorBox.md): Sets tooltip border color of given control.
- [ctrlSetTooltipColorShade](../../commands/ctrlSetTooltipColorShade.md): Sets tooltip background color of given control.
- [ctrlSetTooltipColorText](../../commands/ctrlSetTooltipColorText.md): Sets tooltip text color of given control.
- [ctrlSetTooltipMaxWidth](../../commands/ctrlSetTooltipMaxWidth.md): Set maximum width of a control's tooltip.
- [ctrlSetURL](../../commands/ctrlSetURL.md): Sets URL property of the given control subject to `allowedHTMLLoadURIs[]` whitelisting in CfgCommands config. Supported controls are: - `CT_BUTTON` - `CT_SHORTCUTBUTTON` - `CT_ACTIVETEXT`
- [ctrlSetURLOverlayMode](../../commands/ctrlSetURLOverlayMode.md): Sets how to handle opening of URL, default browser or Steam overlay. Possible values: - 0 - default browser - 1 - Steam overlay if enabled, otherwise default browser - 2 - Steam overlay, shows error message box if…
- [ctrlShadow](../../commands/ctrlShadow.md): Returns 'shadow' property of the control (see ctrlSetShadow).
- [ctrlShow](../../commands/ctrlShow.md): Shows or hides a control, or group of controls together with all the controls inside that group of controls.
- [ctrlShown](../../commands/ctrlShown.md): Returns whether given control is shown.
- [ctrlStyle](../../commands/ctrlStyle.md): Returns the provided control's style. See Arma: GUI Configuration#Control Styles.
- [ctrlText](../../commands/ctrlText.md): Returns the text of a control of the currently active user dialog. This command can be used on static texts, buttons, edit lines and active texts as well as for images, where it returns the image path.
- [ctrlTextColor](../../commands/ctrlTextColor.md): Returns control's text color
- [ctrlTextHeight](../../commands/ctrlTextHeight.md): Returns the text control's height. Supported control types: - CT_STATIC - CT_STRUCTURED_TEXT - CT_EDIT - Arma 3 v2.06 CT_XKEYDESC - Arma 3 v2.06 CT_XBUTTON - Arma 3 v2.06 CT_SHORTCUTBUTTON - Arma 3 v2.06 CT_BUTTON -…
- [ctrlTextSecondary](../../commands/ctrlTextSecondary.md): Returns the secondary text of a text control.
- [ctrlTextSelection](../../commands/ctrlTextSelection.md): Returns edit control text selection in format [start, length, selectedText].
- [ctrlTextWidth](../../commands/ctrlTextWidth.md): Returns the width of the control text including left and right margins (0.008 each).
- [ctrlTooltip](../../commands/ctrlTooltip.md): Returns the tooltip property of a button control. Getter for ctrlSetTooltip.
- [ctrlType](../../commands/ctrlType.md): Returns number representing the type of control, which is also defined by *type* property in config. For more information see Arma: GUI Configuration
- [ctrlURL](../../commands/ctrlURL.md): Returns the URL property of a button control. Getter for ctrlSetURL.
- [ctrlURLOverlayMode](../../commands/ctrlURLOverlayMode.md): Returns the URL overlay mode 0, 1, 2 (see ctrlSetURLOverlayMode) or -1 if something went wrong.
- [ctrlVisible](../../commands/ctrlVisible.md): Returns if a control of the currently active user dialog is shown or not. Read Arma: GUI Configuration for more information about user dialogs and controls.
- [ctrlWebBrowserAction](../../commands/ctrlWebBrowserAction.md): Executes an action on a WebBrowser control. The type of parameters depends on the action type. Possible Actions are:
- [cutFadeOut](../../commands/cutFadeOut.md): Terminates the effect in the given layer by fading it out according to the given duration. If named layer is used and it doesn't exist, it will be allocated. For title layer see titleFadeOut.
- [cutObj](../../commands/cutObj.md): Displays an object defined in the global config in `CfgTitles`.
- [cutRsc](../../commands/cutRsc.md): Display a resource defined in RscTitles of the mission's Description.ext, the campaign's description.ext or the global config.
- [cutText](../../commands/cutText.md): Displays a text message in the center of the screen. The text can be displayed on multiple lines by using "\n" new line characters: `cutText ["line1\nline2\nline3", "PLAIN"];`
- [dialog](../../commands/dialog.md): Tests whether any user dialog is open.
- [disableSerialization](../../commands/disableSerialization.md): Disable saving of script containing this command. After this, the script can work with data types which do not support serialization (UI types).
- [displayChild](../../commands/displayChild.md): Returns child display of the given display.
- [displayCtrl](../../commands/displayCtrl.md): Return child control with specified idc.
- [displayNull](../../commands/displayNull.md): A non-existing Display. To compare non-existent displays use isNull or isEqualTo:
- [displayParent](../../commands/displayParent.md): Returns parent display of the given display.
- [displayUniqueName](../../commands/displayUniqueName.md): Get the provided display's UI On Texture unique name.
- [displayUpdate](../../commands/displayUpdate.md): Set the provided display to update its UI On Texture render.
- [findDisplay](../../commands/findDisplay.md): Finds a display by its IDD which can either be defined in missionConfigFile (description.ext) or configFile (config.cpp) or by its UI On Texture's unique name (see displayUniqueName).
- [focusedCtrl](../../commands/focusedCtrl.md): Returns display's focused control.
- [gearIDCAmmoCount](../../commands/gearIDCAmmoCount.md): Returns ammo count of assigned magazine.
- [gearSlotAmmoCount](../../commands/gearSlotAmmoCount.md): Returns ammo count of assigned magazine.
- [gearSlotData](../../commands/gearSlotData.md): Returns gear slot item name.
- [getTextWidth](../../commands/getTextWidth.md): Returns estimated width of the text based on font type and size. Similar to ctrlTextWidth but does not require a control and can be used to estimate text width for any control including buttons.
- [getUserMFDText](../../commands/getUserMFDText.md): Returns array of user text variables used in MFD.
- [htmlLoad](../../commands/htmlLoad.md): Load HTML from file or URI using given control. File path is relative to current mission dir or an absolute path (with drive letter etc.). The command is subject to restrictions, imposed by CfgCommands class.
- [image](../../commands/image.md): Creates a structured text containing the given image. Use setAttributes to set additional attributes on the image.
- [isSteamOverlayEnabled](../../commands/isSteamOverlayEnabled.md): Returns true if Steam overlay is enabled, otherwise false.
- [isUIContext](../../commands/isUIContext.md): Returns true if the script originated from some UI control event, for example from "onButtonDown" EH. Exists within parent scope and immediate child scopes.
- [lbTooltip](../../commands/lbTooltip.md): Returns tooltip for ListBox, ComboBox and Toolbox
- [preloadTitleObj](../../commands/preloadTitleObj.md): Preloads data for the given resource object.
- [preloadTitleRsc](../../commands/preloadTitleRsc.md): Resource title - preload data. The resource can be defined in the Description.ext file.
- [progressPosition](../../commands/progressPosition.md): Returns the current position in the progress bar.
- [progressSetPosition](../../commands/progressSetPosition.md): Sets progress position of a progress bar.
- [setUserMFDText](../../commands/setUserMFDText.md): Stored user text value in MFD, limit is 50, user0...user49
- [sliderPosition](../../commands/sliderPosition.md): Returns current thumb position of CT_SLIDER or CT_XSLIDER with given idc of topmost user dialog.
- [sliderRange](../../commands/sliderRange.md): Returns limits of CT_SLIDER or CT_XSLIDER.
- [sliderSetPosition](../../commands/sliderSetPosition.md): Sets current thumb position of CT_SLIDER or CT_XSLIDER.
- [sliderSetRange](../../commands/sliderSetRange.md): Sets limits of CT_SLIDER or CT_XSLIDER.
- [sliderSetSpeed](../../commands/sliderSetSpeed.md): Sets slider line step and page step delta amount as well as optional step amount of CT_SLIDER or CT_XSLIDER with given idc of topmost user dialog.
- [sliderSpeed](../../commands/sliderSpeed.md): Returns slider step value for line and page movement of CT_SLIDER or CT_XSLIDER.
- [titleCut](../../commands/titleCut.md) **[deprecated]**: Displays text on screen.
- [titleFadeOut](../../commands/titleFadeOut.md): Terminate the title effect and set duration of the fade out phase to the given time. Same as cutFadeOut but for the title layer.
- [titleObj](../../commands/titleObj.md): Shows object defined in global config in CfgTitles
- [titleRsc](../../commands/titleRsc.md): Displays a resource defined in RscTitles. Also see cutRsc, with these two commands you can show two different resources at once.
- [titleText](../../commands/titleText.md): Displays text across the screen. If used along with cutText two different texts (in different type styles) can be shown at once.
- [uiNamespace](../../commands/uiNamespace.md): Returns the global namespace attached to user interface.
