Skip to main content

TdxCustomLayoutControl.OnGetItemStoredPropertyValue Event

Enables you to specify the layout element custom setting’s value.

Declaration

property OnGetItemStoredPropertyValue: TdxLayoutControlGetItemStoredPropertyValueEvent read; write;

Remarks

Fires when storing layout element settings to the storage, and after the OnGetItemStoredProperties event.

When customizing the list of layout element settings that will be stored in external storage using the OnGetItemStoredProperties event handler, it is necessary to specify the custom setting’s value, using the OnGetItemStoredPropertyValue event handler.

Sender specifies the layout control that owns AItem.

AItem specifies the layout element whose setting will be stored.

AName specifies the setting to be stored.

AValue specifies the setting’s value.

The following example shows how to handle the OnGetItemStoredPropertyValue event in order to store the enabled state of standard layout items. It specifies the value of the ControlEnabled setting which was added to the list by an OnGetItemStoredProperties event handler:

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

To learn how to add the ControlEnabled setting to the list, refer to the example in the OnGetItemStoredProperties help topic.

See Also