NextFocusID
(Engine-Level Function)
Description: | Moves the focus position to a specific ID number. |
Returns: | Nothing |
Usage: | Script Only. |
Function Groups: | Graphics, Keyboard |
Related to: | FocusID |
Format: | NextFocusID(Object, ID) |
Parameters: |
Object |
Required. Any expression for the object that defines the window where the focus is found. |
ID |
Required. Any numeric expression for the new focus ID number. |
Local |
Optional Boolean. If True then focus calls are module-specific (i.e. local to the module calling Focus.) |
Comments: | This statement is useful for forcing the focus to a specific object in a window. |
Example:
If Change(myVar, 0); [ IfThen(FocusID(Self()) != myFocus, NextFocusID(Self(), myFocus)); ]
These statements check a variable called myVar, whose value is set in previous code by an edit field, and whenever its value changes (i.e. the edit field received the focus) the focus is checked, then reverted to another object (such as an OK button).