Link Search Menu Expand Document

FocusObject.SetFocus Method

Explanation Set the keyboard focus on the object.

The focus does not move immediately when I execute the SetFocus method.
The object is changed to preferentially receive focus and is set to focus after the ongoing processing is complete.

If the SetFocus method is executed on multiple objects at once in the same screen, the last executed SetFocus method will be effective.

Not valid if the object is in a state where it cannot receive focus.

Changed since Ver.4.0.2, Mobile Ver.3.0.0 to enable the last setFocus method executed in multiple executions in the same screen.
Call format obj.SetFocus( )
Return value None
Arguments None
Exception None
Example of use
if (MessageBox("確認してください", "確認", $OkCancel) == OkSelected) {
    TextBox1.SetFocus();
}
    
Related item