ctrlSetFocus: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - "<code>\[\[([a-zA-Z0-9_]+)\]\] ([a-zA-Z0-9_]+);?<\/code>" to "<sqf>$1 $2;</sqf>")
(Moved not from Nelis75733126 into the description)
 
(4 intermediate revisions by 2 users not shown)
Line 19: Line 19:


|descr= Sets the input focus on given control.
|descr= Sets the input focus on given control.
{{Feature|important|
* [[ctrlSetFocus]] seems to only work on controls that accept any input from keyboard or mouse.
* if [[ctrlSetFocus]] is used on a [[CT_CONTROLS_GROUP]] that contains an interactable control, that control will automatically be active.
* if [[ctrlSetFocus]] is used on a [[CT_CONTROLS_GROUP]] in which there are no interactable controls, then [[ctrlSetFocus]] will do nothing.}}


|s1= [[ctrlSetFocus]]  control
|s1= [[ctrlSetFocus]]  control
Line 30: Line 35:
|seealso= [[focusedCtrl]]
|seealso= [[focusedCtrl]]
}}
}}
<dl class="command_description">
<dt></dt>
<dd class="notedate">Posted on June 30, 2017 - 09:54 (UTC)</dd>
<dt class="note">[[User:IT07|IT07]]</dt>
<dd class="note">
This command seems to only work on controls that accept any input from keyboard or mouse.
</dd>
</dl>

Latest revision as of 10:12, 13 July 2025

Hover & click on the images for description

Description

Description:
Sets the input focus on given control.
Groups:
GUI Control

Syntax

Syntax:
ctrlSetFocus control
Parameters:
control: Control
Return Value:
Nothing

Examples

Example 1:
ctrlSetFocus _control;

Additional Information

See also:
focusedCtrl

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