WebUIControl.SetFocus

From Xojo Documentation

Method

WebUIControl.SetFocus()

New in 2020r1

Supported for all project types and targets.

Sets the focus to the Control.

Sample Code

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

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