ctrlSetFocus: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
m (Text replacement - "Nelis.75733126" to "Nelis75733126")
 
(42 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |Game name=
|game1= arma1
|version1= 1.00


|1.00|= Game version
|game2= arma2
____________________________________________________________________________________________
|version2= 1.00


| Set the input focus on given control. |DESCRIPTION=
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| '''ctrlSetFocus''' controlName|SYNTAX=
|game4= tkoh
|version4= 1.00


|p1= controlName: [[Control]] |PARAMETER1=
|game5= arma3
|version5= 0.50


| [[Nothing]] |RETURNVALUE=
|gr1= GUI Control
____________________________________________________________________________________________
 
|x1= <pre>ctrlSetFocus _control</pre> |EXAMPLE1=
____________________________________________________________________________________________


| |SEEALSO=
|descr= Sets the input focus on given control.


}}
|s1= [[ctrlSetFocus]]  control


<h3 style="display:none">Notes</h3>
|p1= control: [[Control]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|r1= [[Nothing]]
</dl>


<h3 style="display:none">Bottom Section</h3>
|x1= <sqf>ctrlSetFocus _control;</sqf>


[[Category:Scripting Commands|CTRLSETFOCUS]]
|seealso= [[focusedCtrl]]
[[Category:Scripting Commands ArmA|CTRLSETFOCUS]]
}}
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dd class="notedate">Posted on June 30, 2017 - 09:54 (UTC)</dd>
 
<dt class="note">[[User:IT07|IT07]]</dt>
<dt></dt>
<dd class="notedate">Posted on 2017-06-30 - 09:54 (UTC)</dd>
<dt class="note">[[User:Nelis75733126|Nelis75733126]]</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>
<!-- DISCONTINUE Notes -->

Latest revision as of 15:38, 29 June 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)
Nelis75733126
  • 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.