FocusID

Description:              This function returns the focus ID of the object in a window that currently has the input focus.

Returns:                    Numeric

Usage:                       Script

Format:                      FocusID(Window)

Parameters:             Window    { Window object }  { required }  { no default: }

                                      Any object value that will specify the instance of a window.

Comments:               If the window is currently inactive, this function will return the focus ID of the object that will receive the input focus when the window becomes active.

This function may only appear in a script.

Example:

ZButton(10, 100, 110, 130, "OK", 1);

If LocSwitch() == 4 { Left mouse button pressed };

[

  IfThen(FocusID(Self()) != 1 { Focus leaves the OK button },

        NextFocusID(Self(),1) { Return focus to OK button });

]

This set of statements ensures that after any input by the mouse (i.e. clicking of the left mouse button), the focus will return to the "OK" button.

See Also:

NextFocusID