ctrlSetTextSelection

From Bohemia Interactive Community
Jump to navigation Jump to search
Introduced with Arma 3 Development Branch version 1.991.99DEV BRANCH ONLY ⚠
Hover & click on the images for descriptions

Description

Description:

Syntax

Syntax:
Selects 'length' characters of edit control from the 'start' position and places cursor at the end of selection. To move cursor only, set 'length' to 0.
Parameters:
control: Control
[start, length]: Array
start: Number - selection start position
length: Number - length of characters to select (0 to only move the cursor)
Return Value:
control ctrlSetTextSelection [start, length]

Examples

Example 1:
_control ctrlSetTextSelection [5, 10]
Example 2:
disableSerialization; private _ctrl = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscEditMulti", -1]; _ctrl ctrlSetPosition [0,0,0.5,0.3]; _ctrl ctrlCommit 0; _ctrl ctrlSetText "Hello World"; _ctrl ctrlSetTextSelection [6, 5]; // selects World ctrlSetFocus _ctrl;

Additional Information

See also:
Nothing

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.

Notes

Bottom Section