ctrlSetTextSelection: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (example) |
m (Add ctrlSetText to see also) |
||
Line 33: | Line 33: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[ctrlTextSelection]] |SEEALSO= | | [[ctrlTextSelection]] [[ctrlSetText]] |SEEALSO= | ||
}} | }} |
Revision as of 10:06, 5 May 2020
Description
- Description:
- 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.
- Groups:
- Uncategorised
Syntax
- Syntax:
- control ctrlSetTextSelection [start, length]
- 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:
- Nothing
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:
- ctrlTextSelection ctrlSetText
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
[[Category:Introduced with arma3dev version 1.99]][[ Category: arma3dev: New Scripting Commands | CTRLSETTEXTSELECTION]][[ Category: arma3dev: Scripting Commands | CTRLSETTEXTSELECTION]]