Give the focus to the specified control on the form.
Give the focus to a control on the active form.
App.ActiveForm.SetActiveControl(Control)
Newlook Smartclient
Newlook Server
Limited support in Newlook Server - see Use section below.
Control - (Object, Required)
Specifies the control that is to be given focus when the form is loaded. The control can be referenced using either its name or its index within the controls collection.
Returns a Boolean indicating the success or failure of the method.
This method can be used to set the focus to a specific control on the form.
By default, Newlook gives focus to the first entry capable field sent through in the 5250 data stream. The SetActiveControl method can be used to change the control that receives focus to something other than the default, this is especially useful on screens where the fields have been rearranged to conform with business work flow requirements, or for validation purposes.
The SetActiveControl method can not be called until after a host form has been received, therefore it cannot be called via the OnReceive or OnRefresh event properties of a form. Instead the OnTimer event property must be used if you want to set a custom active control when the form is first displayed.
Newlook Server does not support the OnTimer event - therefore this method has limited applications in Server and can only be called via a user-initiated event property, such as the OnClick property or OnChange property of a control.
The following example will set the focus to a control named MyControl: VB SCRIPTSub SetInitialFocus
End Sub |
Give the focus to a control on the master form.
App.ActiveForm.SetActiveControl(App.MasterForm.Control)
Newlook Smartclient
Newlook Server
Limited support in Newlook Server - see Use section below.
Control - (Object, Required)
Specifies the control that is to be given focus when the form is loaded. The control can be referenced using either its fully qualified name or its index within the Master Form's controls collection.
Returns a Boolean indicating the success or failure of the method.
This method can be used to set the focus to a specific control on the current master form.
It is important to use a fully qualified name in the control parameter of this method when setting focus to an object on the master form. If "App.MasterForm." is left out, Newlook will assume the default, which is the active client form.
Newlook Server does not support the OnTimer event - therefore this method has limited applications in Server and can only be called via a user-initiated event property, such as the OnClick property or OnChange property of a control.
The following example will set the focus to a control, cbLanguageOptions, on the master form: VB SCRIPTSub SetFocusToMasterForm
End Sub |
SetActiveCell method | ActiveForm property | ActiveControl property | OnTimer property | TimerInterval property | TimerCount property
© 2004-2021 looksoftware. All rights reserved.