Auto Select all text in textbox on click

Good day,

How can I have all text selected in a textbox when I click on it to enter new number?
In other words, I want to click on the textbox and start entering new text without first deleting the previous text entered.
Click, type & enter no deleting before typing.

You can use this extension: [FREE] TextboxUtil - ⌨️ Additional Tools To The Built-In TextBox Component!. When the TextBox receives focus (TextBox.GotFocus), select all of the text of the TextBox (TextboxUtil.SelectAll).

1 Like

Consider emptying the textbox.Text values after the previous entry has been completely processed successfully.

No extension would be needed for that, and it would allow the user to go back and correct typos before submission and after processing failure due to input errors.

2 Likes

It does not work. What am I missing.
When I click on the textbox and start typing (depending on what side the cursor is) it just add the new number, it does not replace the old number (still need to first delete the old number before typing the new number.

Try this

image

the textbox needs to lose the focus before it can get the focus again and clear the textbox. Your second textbox could always be 1x1 pixels....

Note, there are some extensions out there that will give other components (e.g. button) the focus

1 Like

Thanks. This works fine for me.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.