[Overview][Types][Classes][Index] | Reference for unit 'PropertyStorage' (#lcl)

# TStoredValue.OnSave

Event handler signalled when the collection item value is saved.

## Declaration

Source position: propertystorage.pas line 60

`published property TStoredValue.OnSave : TStoredValueEvent read FOnSave write FOnSave;`

## Description

OnSave is a TStoredValueEvent property with the event handler signalled when the Value for the collection item is saved to the storage container for the collection. Arguments passed to the event handler identify the collection item and the value for the collection item. The Value parameter is a variable argument and can be modified in the event handler as needed.

OnSave is signalled (when assigned) from the Save method, and occurs before the collection item value is XOR encoded (when needed) and written to the storage container for the collection.

Use OnRestore to perform actions needed when the collection item is retrieved from the storage container for the collection.

## See also

TStoredValue.Value |  | The value of the property (as a String or a Variant type).
TStoredValue.KeyString |  | XOR encoding key, empty for encoding is not used.
TStoredValue.Save |  | Saves the value for the collection item to the storage container for the collection.
TStoredValue.Restore |  | Loads the value for the collection item from the storage container for the collection.
TStoredValue.OnRestore |  | Event handler signalled when the collection item value is restored.
TStoredValueEvent |  | Type of an TStoredValue.OnSave and OnRestore notification handler.