vcl-dxdashboard-dot-control-dot-tdxcustomdashboardcontrol-0e4560ab.md
Allows you to customize Dashboard Designer dialog form settings.
property OnDesignerFormShow: TdxBackendFormNotifyEvent read; write;
Handle OnDesignerFormShow and OnViewerFormShow events to customize Dashboard Designer and Dashboard Viewer dialogs when displayed. You can change caption, dimensions, position, and other settings as demonstrated in the following code example: Modify Dashboard DesignerForm Settings.
The ShowDesigner procedure raises the OnDesignerFormShow event.
The following parameters are available within an OnDesignerFormShow event handler:
ASenderProvides access to the TdxDashboardControl component that raised the OnDesignerFormShow event.AFormProvides access to the Dashboard Designer dialog form.
Refer to the TdxBackendFormNotifyEvent procedural type description for detailed information on parameters accessible within an OnDesignerFormShow event handler.
The following code example demonstrates an OnDesignerFormShow event handler that modifies caption, dimensions, and position of the Dashboard Designer dialog when it is displayed:
uses
dxDashboard.Control; // Declares the TdxDashboardControl component
//...
procedure TMyForm.dxDashboardControl1DesignerFormShow(ASender: TObject; AForm: TForm);
begin
AForm.Caption := 'My Dashboard Designer'; // Changes the Dashboard Designer form caption
AForm.WindowState := wsNormal; // Switches from maximized to the normal form state
AForm.Position := poScreenCenter; // Centers the dialog on the screen
AForm.Width := 1200; // Specifies the dialog width
AForm.Height := 800; // Specifies the dialog height
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::dxDashboardControl1DesignerFormShow(TObject *ASender, TForm *AForm)
{
AForm->Caption = "My Dashboard Designer"; // Changes the Dashboard Designer form caption
AForm->WindowState = wsNormal; // Switches from maximized to the normal form state
AForm->Position = poScreenCenter; // Centers the dialog on the screen
AForm->Width = 1200; // Specifies the dialog width
AForm->Height = 800; // Specifies the dialog height
}
See Also
TdxReport.OnDesignerFormShow Event
TdxCustomDashboardControl Class