SetFocus method (WinStudio scripts)

Applies To

IWSForm interface

Definition

Changes the focus on the form to a specified component.

Syntax

object.SetFocus( string )

  Part   Description
object Required. The name of a valid form object.
string Required. The name of the component to receive the focus.

Remarks

Generally, you should avoid using this method to work around tab-order problems related to dynamic enabling/disabling of components. If a form is later modified, this method can cause unexpected behavior that is difficult to diagnose.

Example

Sub Main()
   Application.FindForm("formName").SetFocus("componentName")
End Sub