RestoreDefaults - cWebPromptList
Restores the initial values of web properties that were likely to be changed during a popup instance
Type: Procedure
Syntax
Procedure RestoreDefaults
Call Example
Send RestoreDefaults
Description
The RestoreDefaults method provides a mechanism for to restoring prompt list web properties back to their design-time default. This is called early during the prompt list initialization and resets various web properties back to their original setting. This makes it easy to customize the behavior of a prompt list based on the user and the object that invokes it, which makes it possible to reuse the same prompt list for a variety of purposes.
When a prompt list is displayed, it sends RestoreDefaults, which stores all of the restorable web properties back to their initial state. It then sends the event Prompt_Callback to the invoking object, which is what might be used to customize web properties for this invocation. Therefore, you can make property changes within Prompt_Callback knowing that the default values will be restored the next time the prompt list is shown.
The following web properties are restored within RestoreDefaults:
pbAutoSeed peUpdateMode piInitialColumn piUpdateColumn psPromptUpdateCallback psSeedValue
If you need to preserve other custom web properties within your object or subclass by augmenting RestoreDefaults, a property is restored to its initial value by getting its value and WebSetting it.
Class cMyWebPromptList is a cWebPromptList
Procedure Construct_Object
Forward Send Construct_Object
{ WebProperty=True }
Property Boolean pbMyCustomProperty
End_Procedure
Procedure RestoreDefaults
Boolean bState
Forward Send RestoreDefaults
Get pbMyCustomProperty To bState
WebSet pbMyCustomProperty to bState
End_Procedure
End_Class
See Also