unit BasicStatsReportAndChartFormUnit; {$mode objfpc}{$H+} interface uses Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls, StdCtrls, ReportFrameUnit, ChartFrameUnit, BasicStatsParamsFormUnit; type { TBasicStatsReportAndChartForm } TBasicStatsReportAndChartForm = class(TBasicStatsParamsForm) PageControl: TPageControl; ReportPage: TTabSheet; ChartPage: TTabSheet; private protected FReportFrame: TReportFrame; FChartFrame: TChartFrame; procedure InitForm; override; procedure UpdateBtnStates; override; public constructor Create(AOwner: TComponent); override; procedure Reset; override; end; var BasicStatsReportAndChartForm: TBasicStatsReportAndChartForm; implementation {$R *.lfm} constructor TBasicStatsReportAndChartForm.Create(AOwner: TComponent); begin inherited; FReportFrame := TReportFrame.Create(self); FReportFrame.Parent := ReportPage; FReportFrame.Align := alClient; FChartFrame := TChartFrame.Create(self); FChartFrame.Parent := ChartPage; FChartFrame.Align := alClient; FChartFrame.Chart.BottomAxis.Intervals.MaxLength := 80; FChartFrame.Chart.BottomAxis.Intervals.MinLength := 30; Reset; end; procedure TBasicStatsReportAndChartForm.InitForm; begin inherited; PageControl.ActivePageIndex := 0; end; procedure TBasicStatsReportAndChartForm.Reset; begin inherited; if Assigned(FReportFrame) then FReportFrame.Clear; if Assigned(FChartFrame) then FChartFrame.Clear; end; procedure TBasicStatsReportAndChartForm.UpdateBtnStates; begin inherited; if Assigned(FReportFrame) then FReportFrame.UpdateBtnStates; if Assigned(FChartFrame) then FChartFrame.UpdateBtnStates; end; end.