Set Focus

  • Thread starter Thread starter Angel
  • Start date Start date
A

Angel

How do I set the focus (In a form) on a text box and highlight its contents?
I am using:
mytextbox.SetFocus

But the cursor sits at the beggining of my textbox and I have to highlight
the entire contents to erase them and then start typing.

Any suggestions are more than welcome.
 
How do I set the focus (In a form) on a text box and highlight its contents?
I am using:
mytextbox.SetFocus

But the cursor sits at the beggining of my textbox and I have to highlight
the entire contents to erase them and then start typing.

Any suggestions are more than welcome.

When you set focus to a field, highlighting the whole field (if it has
a value) is the default, so you must have some code somewhere
setting the cursor at the start of the control.
Check your code for SelStart.
Something like mytextbox.selstart = 1
 
Back
Top