Page 1 of 1

Marking the Content of a Textbox

Posted: Mon May 30, 2016 12:19 pm
by dieter
Hello,
in a mask we have a textbox, which has an amount. The user probably wants to change the amount. To make it comfortable for the user we set the focus into the textbox. So the user can see the textbox with the amount and a blinking cursor in the textbox. If he wants to change the amount he has to delete the old amount and the to enter the new amount. So the user wishes that the amount should be marked (i don't know if this is the correct english word), so that he directly can overwrite the value.

Is there such a possibility?

Dieter

Re: Marking the Content of a Textbox

Posted: Mon May 30, 2016 5:04 pm
by emhill
Try this on the onfocus event for the text box:

this.select();

This will select/highlight the entire textbox so the user can just start keying over the existing data.

Hope this helps!

Re: Marking the Content of a Textbox

Posted: Tue May 31, 2016 9:22 am
by dieter
Great!
Works perfect!
Thank you very much.