GETFOCUSEDCONTROL Method (Window)
Description
Returns the ID of the control that has the focus if the WINDOW is active, or, if the WINDOW is not active, the ID of the control that will receive the focus when it is.
Syntax
FocusCtrlID = Exec_Method( WindowID, "GETFOCUSEDCONTROL", NoInternal )
Parameters
Name | Required | Description |
---|---|---|
NoInternal | No | If TRUE$ then only controls not marked as "Internal" will be returned. Defaults to FALSE$. |
Returns
The name of the control that is currently focused or will receive the focus when the WINDOW is activated.
Remarks
Executing this method is essentially the same as using the "get" operation in the WINDOW FOCUS property to return the current focus control for the window. However, some objects, like the cell editor an in EDITTTABLE control, are marked as "internal" and it may not be appropriate to use them when returned via the FOCUS property. In this case it is better to use the GETFOCUSEDCONTROL method and the NoInternal parameter to return the parent non-internal object ID instead.
Example
$Insert Logical //// Return the focused control for the window, resolving it to a non- // //// internal ID as needed.// FocusCtrlID = Exec_Method( @Window, "GETFOCUSEDCONTROL", TRUE$ )
See Also
Common INTERNALOBJECT property, Common GUI FOCUS property, SYSTEM FOCUS property, WINDOW FIRSTFOCUS property, WINDOW FOCUS property, WINDOW ACTIVATED event, WINDOW INACTIVATED event.