SubChart events

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
NikeMan
Newbie
Newbie
Posts: 2
Joined: Mon Apr 07, 2008 12:00 am

SubChart events

Post by NikeMan » Wed May 20, 2009 6:27 am

Is it possible to catch subcharts events for example the OnZoom event?

Best regards,
Nikemann

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed May 20, 2009 10:53 am

Hi Nikemann,

Yes, but you should assign them at runtime. This code works fine here:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  ChartTool1.Charts[0].Chart.Title.Visible := true;

  ChartTool1.Charts[0].Chart.OnZoom := Chart1Zoom;
  ChartTool1.Charts[0].Chart.OnUndoZoom := Chart1UnZoom;
end;

procedure TForm1.Chart1Zoom(Sender: TObject);
begin
  ChartTool1.Charts[0].Chart.Title.Text.Text := 'Zoomed';
end;

procedure TForm1.Chart1UnZoom(Sender: TObject);
begin
  ChartTool1.Charts[0].Chart.Title.Text.Text := 'UnZoomed';
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

NikeMan
Newbie
Newbie
Posts: 2
Joined: Mon Apr 07, 2008 12:00 am

Post by NikeMan » Wed May 20, 2009 11:28 am

Hi Yeray,

Tanks, it works also fin here.
My problem was, not knowing how to assign at runtime.


Best regards
Nikeman

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed May 20, 2009 11:31 am

Hi Nikemann,

I'm happy to be helpful!
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply