# Selected text highlight

**URL:** <https://forum.xojo.com/t/selected-text-highlight/36369>\
**Category:** macOS\
**Created:** [February 28, 2017, 9:48am UTC](https://forum.xojo.com/t/selected-text-highlight/36369 "2017-02-28T09:48:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon2806658](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/a3d4f5/32.png) [@anon2806658](https://forum.xojo.com/u/anon2806658)\
**Post date:** [February 28, 2017, 9:48am UTC](https://forum.xojo.com/t/selected-text-highlight/36369/1 "2017-02-28T09:48:45Z")

</div>

Hi, I would like to highlight (set background or textcolor) the selected text in a textarea. Is it possible?  
I select the text, copy it, and set the focus to another control. I cant have the focus on the selected text, so i need to color the selected text, so the user knows what he selected.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [February 28, 2017, 10:21am UTC](https://forum.xojo.com/t/selected-text-highlight/36369/2 "2017-02-28T10:21:00Z")

</div>

[http://documentation.xojo.com/index.php/TextArea](http://documentation.xojo.com/index.php/TextArea)

Read specifically Selected Text Properties:  
TextArea1.SelStart, TextArea1.SelLength, etc.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 6:40pm UTC](https://forum.xojo.com/t/selected-text-highlight/36369/3 "2020-10-29T18:40:34Z")

</div>


