Skip to content

FocusObject - cBaseLocalControlHost

Returns the object handle of the object representing the currently focused control on the client

Type: Function
Return Data Type: Handle

Syntax

Function FocusObject Returns Handle

Call Example

Get FocusObject to HandleVariable

Description

Call FocusObject to return the DataFlex object handle of the server-side object that represents the current focused object on the client. This is useful for sending some message or performing some operation on the focused object.

FocusObject can be used in the OnClick event of a menu item or toolbar button (cWebMenuItem) to send some message to the object that had the focus when the menu item was selected.

If FocusObject returns C_WebUnresolvedObject, then there is no focus object.

The returned value remains in scope during execution of a client call to the server.

Return Value

Handle of the object representing the currently focused control on the client