Skip to content

phmPromptUpdateCallback - cMonthCalendarPrompt

Defines a custom message to be sent to the invoking object as part of the selection update process

Type: Property
Access: Read/Write
Data Type: Handle
Parameters: None

Syntax

Property Handle phmPromptUpdateCallback
Access Type Syntax
Read Access: Get phmPromptUpdateCallback to HandleVariable
Write Access: Set phmPromptUpdateCallback to HandleVariable/Value

Description

If phmPromptUpdateCallback is set to an event message, this event will be called as part of the calendar prompt's selection and update process.

It calls the event passing three parameters - a handle of the prompt object followed by two dates. If the calendar is single-select (pbMultiSelect=False) the selected date is placed in the first date variable. If the calendar is date-range select (pbMultiSelect=True) the lower date is placed in the first date variable and the higher date is placed in the second date variable.

This is called in addition to and after the normal update. Normally, you will only use this when peUpdateMode is umPromptCustom, since the umPromptCustom mode has no automatic mechanism for updating a selection.

This property is normally set within the invoking object's Prompt_Callback event.

Object oButton1 is a Button
    Set Location to 121 100
    Set Label to 'Change'

    Procedure DoDateUpdate Integer hoSel Date dDate1 Date dDate2
        Set Value of oDateTextBox to dDate1
    End_Procedure

    Procedure Prompt_Callback Integer hoPrompt
        Date dDate
        Get Value of oDateTextBox to dDate
        Set peUpdateMode of hoPrompt to umPromptCustom
        Set pdSeedValue of hoPrompt to dDate
        Set phmPromptUpdateCallback of hoPrompt to (RefProc(DoDateUpdate))
    End_Procedure

    Procedure OnClick
        Send Popup of oMonthCalendarPrompt
    End_Procedure

End_Object

The phmPromptUpdateCallback is not used when peUpdateMode is umPromptNonInvoking, as there is no invoking object to callback to.