- Home /
Select text in multiple text areas simultaneously
How can I select text in multiple text areas simultaneously? and keep them selected ? Need something similar to the highlight feature in Microsoft Word.
so far I have tried:
(from: http://forum.unity3d.com/threads/30485-Select-text-on-focus)
GUI.FocusControl() in combination with GUI.SetNextControlName().
- Get an ID for text field (using GUIUtilty.GetControlID ())
- Use Event.GetTypeForControl () to detect clicks onto the TextField
- When detect a click, use GUI.FocusControl() to select the text field.
- Call Event.use, so the normal processing of the event by the TextField is overridden.
but still losing selection when another text area is clicked. Any insight is appreciated.
Comment
Answer by Kenneth859 · Sep 29, 2021 at 12:28 PM
For example, select some text. Press and hold CTRL. Select the next item that you want. Important Be sure to press and hold CTRL while you select the next item that you want to include in the selection.