WebTextField.SetFocus does not mark the content

Hi,

I am trying to set the focus to a webtextfield and have the content marked. When I call SetFocus the cursor is placed in the field but the content is not marked. So the user cannot directly enter a new value. Any ideas?

Best regards
Daniel

This seems to be the regular browser behavior for setting focus to a text field with javascript (in other words, behaving as expected).

It looks like WebTextField does not have a SelLength property, so you’ll have to use some Javascript to select all of the text in the field.

Hello Daniel,

…better late than never…

Given a WebTextField named tfFirstName to set the focus to the field and select (highlight) the current contents of the field use .SelectAll

' Set focus and select (highlight) the current contents of the field.
' The user can immediately replace the contents of the web text field simply by typing
tfFirstName.SelectAll

I hope that helps.

Merry Christmas, Andrew