vcl-dxdashboard-dot-control-dot-tdxcustomdashboardcontrol-090eb8f5.md
Allows you to save dashboard layout changes made in the Dashboard Designer dialog.
property OnLayoutChanged: TdxDashboardControlNotifyEvent read; write;
Handle the OnLayoutChanged event to execute custom code in response to dashboard layout updates.
The OnLayoutChanged event occurs in response to every Layout property value change.
The ASender parameter provides access to the TdxDashboardControl component that raised the OnLayoutChanged event.
The following code example saves the current dashboard layout to an XML file every time a user saves pending changes in the Dashboard Designer dialog:
uses
dxDashboard.Control; // Declares the TdxDashboardControl component
// ...
procedure TMyForm.dxDashboardControl1LayoutChanged(ASender: TdxCustomDashboardControl);
begin
ASender.Layout.SaveToFile(ASender.DashboardName + '.xml');
end;
#include "dxDashboard.Control.hpp" // Declares the TdxDashboardControl component
// Add the following linker directive to the corresponding CPP source file:
#pragma link "dxDashboard.Control" // Required to use dxDashboard.Control.hpp declarations
// ...
void __fastcall TMyForm::dxDashboardControl1LayoutChanged(TdxCustomDashboardControl *ASender)
{
ASender->Layout->SaveToFile(ASender->DashboardName + ".xml");
}
See Also
TdxCustomDashboardControl.OnStateChanged Event
TdxCustomDashboardControl Class