WebUIControl.SetFocus

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
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