Need to customize panning

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Krishna
Newbie
Newbie
Posts: 16
Joined: Mon Jun 12, 2006 12:00 am
Contact:

Need to customize panning

Post by Krishna » Mon Aug 14, 2006 7:01 am

Hi,

I am having two graphs on two different axis(i.e. Left and Custom Axis having same x-Axis).
I need to stop vertical panning of second graph which having custom axis, so that only one graph can be moved and other will be static at all time.

Regards,
Krishna.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Aug 14, 2006 8:42 am

Hi Krishna,

you can use the OnAllowScroll event :

Code: Select all

procedure TForm1.Chart1AllowScroll(Sender: TChartAxis; var AMin,
  AMax: Double; var AllowScroll: Boolean);
begin
if Sender = Chart1.CustomAxes.Items[0] then
  AllowScroll:=False;
end;

Krishna
Newbie
Newbie
Posts: 16
Joined: Mon Jun 12, 2006 12:00 am
Contact:

customize panning in VCL

Post by Krishna » Thu Aug 17, 2006 10:10 am

Hi,
The following is the source code given by you can be used for applications, but, I need to develop VCL so, which property/ event I should override.

I found the AllowScroll is property of type TChartScrollEvent. How should i Implement the below logic code for override of AllowScroll in VCL

procedure TForm1.Chart1AllowScroll(Sender: TChartAxis; var AMin,
AMax: Double; var AllowScroll: Boolean);
begin
if Sender = Chart1.CustomAxes.Items[0] then
AllowScroll:=False;
end;

Post Reply