Skip to main content

TdxCustomLayoutControl.OnSetItemStoredPropertyValue Event

Enables you to restore a layout element‘s custom setting that was previously stored by the OnGetItemStoredProperties and OnGetItemStoredPropertyValue event handlers.

Declaration

property OnSetItemStoredPropertyValue: TdxLayoutControlSetItemStoredPropertyValueEvent read; write;

Remarks

Fires when restoring layout element settings from the storage.

Sender specifies the layout control that owns AItem.

AItem specifies the layout element whose setting will be restored.

AName specifies the setting to be restored.

AValue specifies the setting’s value.

The following example shows how to restore the standard layout items‘s enabled status that was stored by the OnGetItemStoredProperties and OnGetItemStoredPropertyValue event handlers (for examples on how to store custom settings, refer to these event descriptions):

procedure <TForm1>.<dxLayoutControl1>SetItemStoredPropertyValue(
  Sender: TdxCustomLayoutControl; AItem: TdxCustomLayoutItem;
  const AName: string; const AValue: Variant);
begin
  if (AName = 'ControlEnabled') and Assigned(TdxLayoutItem(AItem).Control) then
    TdxLayoutItem(AItem).Control.Enabled := AValue;
end;
See Also