WebControl.SetFocus

From Xojo Documentation

Method

WebControl.SetFocus()

New in 2010r4

Supported for all project types and targets.

Sets the focus to the WebControl.

Example

This example checks for a required value when a button is pressed:

If UserNameField.Text = "" Then
MessageBox("Please enter your UserName.")
UserNameField.SetFocus
Return
End If