Skip to content

pbCanceled - cMonthCalendarPrompt

Determines if the calendar prompt list was canceled

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

Syntax

Property Boolean pbCanceled
Access Type Syntax
Read Access: Get pbCanceled to BooleanVariable
Write Access: Set pbCanceled to BooleanVariable/Value

Description

You close a calendar prompt list and accept the choice by sending Ok to the list. If the calendar prompt list is closed by any other means, it is canceled and pbCanceled is set True. Normally, this value is of no interest because the process of updating the object that invoked the prompt list is handled by the class.

If your calendar prompt list is used in a non-invoking mode (peUpdateMode is umPromptNonInvoking), you will need to use pbCanceled to determine how to proceed. Typically, a non-invoking calendar prompt list will contain a method within the prompt list's modal panel object. This is the method that will use pbCanceled and this is the method that will get called from some other object.

// This would be added to the calendar prompt list's panel object.
Function GetSelectedDate Date dSeed Date ByRef dRet Returns Boolean
    Boolean bCancel

    Send OnStoreDefaults of oCalendar

    Set peUpdateMode of oCalendar to umPromptNonInvoking
    Set pdSeedDate of oCalendar to dSeed

    Send Popup

    Send OnRestoreDefaults of oCalendar

    Get pbCanceled of oCalendar to bCancel
    If not bCancel Begin
        Get SelectedDate of oCalendar to dRet
        Function_Return True
    End
    Function_Return False
End_Function