Page 1 of 1

Problem with TGanttTool

Posted: Fri Dec 30, 2005 6:45 pm
by 9239733
Dear Steema Support,
I'm a new user of TeeChart so I have got my first question:
I have got one Gantt-Series and one GanttTool.
Now my Problem:
In my application- When I drag the Gantt-Tool the "Zoom-Function" opens and so when I drop the Gantt-Series the Chart zoomes.
What did I wrong or is it a Bug?
But I need the Zoom-Function so I couldn't turn it off!
Best regrads
Bent Walther

Posted: Mon Jan 02, 2006 11:54 am
by Pep
Hi,

this is not a bug, it's by default, but you could change this behaviour using the following code :

Code: Select all

procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if Series1.Clicked(x,y)<>-1 then
    Chart1.Zoom.Allow := false
  else
    Chart1.Zoom.Allow := true;
end;

procedure TForm1.Chart1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  Chart1.Zoom.Allow:=true;
end;

Posted: Mon Jan 02, 2006 12:04 pm
by 9239733
Thank You very much!
Now it works :D