<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Mark the content of text fields automatically when focus is gained</title><link>https://answers.axonivy.com/questions/355/mark-the-content-of-text-fields-automatically-when-focus-is-gained</link><description>&lt;p&gt;I want to mark the full content of text fields automatically as soon as the text field gains the focus. I use &lt;code&gt;setSelectionStart&lt;/code&gt; und &lt;code&gt;setSelectionEnd&lt;/code&gt; in the focus gained. &lt;/p&gt;
&lt;p&gt;The problem is that I need to create a focus gained event for all text fields. I wonder if there is a more elegant solution to this?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/355/mark-the-content-of-text-fields-automatically-when-focus-is-gained" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 25 Apr 2010 05:50:29 -0400</lastBuildDate><item><title>Answer by Renato Stalder</title><link>https://answers.axonivy.com/questions/355/mark-the-content-of-text-fields-automatically-when-focus-is-gained/356</link><description>&lt;p&gt;Please use the selectAllOnFocusGained property of the text field. It does exactly what you want. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Renato Stalder</dc:creator><pubDate>Sun, 25 Apr 2010 05:50:29 -0400</pubDate><guid>https://answers.axonivy.com/questions/355/mark-the-content-of-text-fields-automatically-when-focus-is-gained/356</guid></item></channel></rss>