Hi!
How can I set (change) Chart.OnZoom in runtime?
Set OnZoom in Runtime
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi msd48,
Sorry but I don't understand which is your exact request. Are you trying to fire the OnZoom event? Would you like to zoom the chart at runtime? ...
Would you be so kind to give us some more details about what you are trying to achieve?
Thanks in advance.
Sorry but I don't understand which is your exact request. Are you trying to fire the OnZoom event? Would you like to zoom the chart at runtime? ...
Would you be so kind to give us some more details about what you are trying to achieve?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Ok.
I`ve something like this:
How can I change in runtime change event handler from zoomOff to zoomOff2 ?
zoomOff and zoomOff2 - it`s a procedures.
I`ve something like this:
Code: Select all
procedure TFormMain.ChartZoom(Sender: TObject);
begin
zoomOff;
end;
How can I change in runtime change event handler from zoomOff to zoomOff2 ?
zoomOff and zoomOff2 - it`s a procedures.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi msd48,
I can think of 2 options:
a. Use an if clause in the OnZoom event implementation:
Hope this helps!
I can think of 2 options:
a. Use an if clause in the OnZoom event implementation:
b. Use 2 OnZoom event implementations:procedure TForm1.Chart1Zoom(Sender: TObject);
begin
if condition then
zoomOff
else
zoomOff2
end;
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.OnZoom:=Chart1Zoom;
//Your code here
Chart1.OnZoom:=Chart1Zoom2;
end;
procedure TForm1.Chart1Zoom(Sender: TObject);
begin
zoomOff;
end;
procedure TForm1.Chart1Zoom2(Sender: TObject);
begin
zoomOff2;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |