pbCanceled - cCJGridPromptList
Determines if the 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 prompt list and accept the choice by sending Ok to the list. If the prompt list is closed by any other means, it is canceled and pbCancelled 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 prompt list is used in a non-invoking mode (peUpdateMode is umPromptNonInvoking) you will need to use pbCanceled to determine how to proceed. Typcially a non-invoking 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 prompt list's panel object.
Function GetSelectedName String sSeed String ByRef sName Returns Boolean
Boolean bCancel
String[] SelectionValues
Send OnStoreDefaults of oSelList
Set peUpdateMode of oSelList to umPromptNonInvoking
Set piUpdateColumn of oSelList to 1
Set psSeedValue of oSelList to sSeed
Send Popup
Send OnRestoreDefaults of oSelList
Get pbCanceled of oSelList to bCancel
If not bCancel Begin
Get SelectedColumnValues of oSelList 1 to SelectionValues
If (SizeOfArray(SelectionValues)) Begin
Move SelectionValues[0] to sName
Function_Return True
End
End
Function_Return False
End_Function