Skip to content

Add_Focus - cUIObject

Adds the object into the focus tree at the Next_Level of the hoParent in the focus tree

Type: Procedure

Parameters

Parameter Type Description
hoParent Handle object handle of focus parent

Syntax

Procedure Add_Focus Handle hoParent

Call Example

Send Add_Focus hoParent

Description

The Add_Focus message adds the object into the focus tree at the Next_Level of the hoParent in the focus tree. If the hoParent is not active, the message is terminated and returns a non-zero value (see below).

Add_Focus or Activate can be used to cancel object activation.

This message is used to construct the focus tree in a predefined structure. The activate message uses this message to either add the object to the next level of the current focus or the next level of the parent of the object, depending on the value of the Attach_Parent_State property.

See Activate for detailed explanations of the View and Modal Dialog activation process.

Get msg_Add_Focus oCustomerEntry to iRetVal

If the object cannot be added to the focus tree, a non-zero value is returned according to the following error conditions:

Col 1 Col 2
1 Error_Activating Activating returned a non zero value
5 Error_Cant_Accept_Focus The Focus_Mode of the object is No_Activate
6 Error_Cant_Create_Tree The object cannot be added to focus tree (probably due to lack of available memory)
7 Error_Add_to_Inactive_Object The hoParent is not active
8 Error_No_Focusable_Children If the object being added to the focus tree has its Client_Area_State set to true, and none of its child objects could be added to the focus tree