ctrlSetFocus: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "IT07" to "Nelis.75733126")
m (added new information to my own note.)
 
Line 37: Line 37:
<dt class="note">[[User:Nelis.75733126|Nelis.75733126]]</dt>
<dt class="note">[[User:Nelis.75733126|Nelis.75733126]]</dt>
<dd class="note">
<dd class="note">
This command seems to only work on controls that accept any input from keyboard or mouse.
* [[ctrlSetFocus]] seems to only work on controls that accept any input from keyboard or mouse.
* if [[ctrlSetFocus]] is used on a ControlsGroup that contains an interactable control, that control will automatically be active.
* if [[ctrlSetFocus]] is used on a ControlsGroup in which there are no interactable controls, then [[ctrlSetFocus]] will do nothing.
</dd>
</dd>


</dl>
</dl>

Latest revision as of 01:28, 23 April 2024

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
Posted on 2017-06-30 - 09:54 (UTC)
Nelis.75733126
  • ctrlSetFocus seems to only work on controls that accept any input from keyboard or mouse.
  • if ctrlSetFocus is used on a ControlsGroup that contains an interactable control, that control will automatically be active.
  • if ctrlSetFocus is used on a ControlsGroup in which there are no interactable controls, then ctrlSetFocus will do nothing.