Prompt_Callback - cComActiveXControl

Sends a callback event to an object that requested a prompt object

Type: Event

Parameters: Handle hoPrompt

ParameterDescription
hoPromptHandle of prompt object being invoked (usually a dbList)


Syntax
Procedure Prompt_Callback Handle hoPrompt

Description

When prompt list objects (cDbCJGridPromptList) are invoked, they send a callback message to their invoking object. This message, Prompt_Callback, is passed the object handle of the prompt object. This message must be understood by the invoking object. This can be used to customize the prompt object for the particular invoking object. This enables you to use a single prompt list for multiple purposes. Normally, this message sets properties in the cDbCJGridPromptList or the dbList.

For a list of properties most likely to be changed within a cDbCJGridPromptList, see the OnStoreDefaults method for that class.

For a list of properties most likely to be changed within a dbList, see the Store_Defaults method for that class.

If any of these properties is changed by Prompt_Callback, the prompt object will automatically restore them when the list is deactivated. This way, the normal behavior of the list will not be altered when it is used by other invoking objects.

In the following example, a form uses a Customer lookup cDbCJGridPromptList. It defines the prompt list to be 'value style' (as opposed to relational, determined by peUpdateMode) and it identifies the target column as being column 1, which is presumably Customer.Name.

Object oMyForm is a Form
    :
    Set Prompt_Object to oCustomerSL

    // this forces a simple value update for column 1
    Procedure Prompt_Callback Handle hoPrompt
        Set peUpdateMode of hoPrompt to umPromptValue
        Set piUpdateColumn of hoPrompt to 1
    End_Procedure

End_Object