<< Click to Display Table of Contents >> Navigation: »No topics above this level« TOC : OZ e-Form Extension > OZ e-Form JavaScript API > Input > TextBox > Method >SetFocus |
Sets the focus to the component.
Prototype :
void SetFocus
(
[ bool MainScreen ]
)
Arguments :
MainScreen |
true for main screen If not set, applies as true |
Reference :
The SetFocus function is only valid for the component on the current page.
If use the SetFocus function in the component on another page, the EnsureVisible function is executed, and then SetFocus() function is executed, please.
If you want to set the focus on the sub-screen in a multi-screen environment, set the MainScreen argument value to false.
Example :
var objComp = GetInputComponent("TextBox1");
objComp.EnsureVisible();
objComp.SetFocus();
Available Events :
OnKeyReturn, OnValueChanged
See also :