Select all the text in a textbox on enter

G

Guest

On enter of my Street Text box, I want all the text in the text box to be
selected. At first it works, but if you click with the mouse pointer in the
textbox, and then tab out of the text box, then tab back in, the cursor is
where the last place the user clicked in the text box. I want all the text
in the textbox to be selected.
 
T

Tom Porterfield

Mike said:
On enter of my Street Text box, I want all the text in the text box to be
selected. At first it works, but if you click with the mouse pointer in the
textbox, and then tab out of the text box, then tab back in, the cursor is
where the last place the user clicked in the text box. I want all the text
in the textbox to be selected.

Handle the GotFocus event and call SelectAll();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top