Page 1 of 1
TeeChart Problem
Posted: Wed Jul 14, 2004 7:40 am
by 8574692
I have a TDBChart and my problem is that in TDBChart.DblClick event I open the tools dialogs as the example and then, when I select the grafic and close the dialog I get the mouse as left button clicked and "zoom tool" opened.
This is the event where I try to control this
procedure TFormGrafico.DBChartGraficoDblClick(Sender: TObject);
begin
inherited;
EditChartPart(Self, DBChartGrafico, PartChart);
DBChartGrafico.CancelMouse := true;
end;
I have read the example that the TeeChart has and it use something similar. I don't know what is the problem.
Posted: Wed Jul 14, 2004 8:40 am
by Pep
Hi,
which Teechart Pro version are you using ? It works fine here using the latest TeeChart Pro v7.01 available for download on our web site , using the folowing code :
procedure TFormGrafico.DBChartGraficoDblClick(Sender: TObject);
begin
EditChartPart(Self, DBChartGrafico, PartChart);
DBChartGrafico.CancelMouse := true;
end;
Also, if you're using older versions you should be able to solve it with the following trick :
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues(10);
DoubClick := false;
end;
procedure TForm1.DBChart1DblClick(Sender: TObject);
begin
DoubClick := true;
EditChartPart(Self, DBChartGrafico, PartChart);
end;
procedure TForm1.DBChart1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
dbChart1.CancelMouse := DoubClick;
DoubClick := false;
end;
Have you tried it ?
I tried It but it doesn't work
Posted: Wed Jul 14, 2004 10:07 am
by 8574692
I tried to do it but i couldn't do DoubClick := true;
How can I do to use this source?
Posted: Wed Jul 14, 2004 11:49 am
by Pep
Hi,
DoubClick is a simple Boolean variable defined in the private or public section.
If you still having problems let me know and I'll prepare an example and will post it into the steema.public.attachments newsgroup for you.
I still have the same problem
Posted: Wed Jul 14, 2004 1:52 pm
by 8574692
Josep, sorry about that but i tried to solve my problem using code as you post here but i still have the same problem.
Try to solve it, i don't know how to do it, thanks
If you post it into the steema.public.attachments newsgroup please tell me.
Posted: Wed Jul 14, 2004 2:43 pm
by Pep
Hi Jym,
sorry, I've seen a better way to solve this, it's using the Abort; procedure after the chart editor closes :
procedure TForm1.ChartEditor1Close(Sender: TObject);
begin
Abort;
end;
Still fails
Posted: Wed Jul 14, 2004 2:55 pm
by 8574692
Josep, I tried to solve it with Abort as you tell me but it doesn't work. I don't know de reason.
Posted: Wed Jul 14, 2004 5:19 pm
by Pep
Hi Jym,
could you please post an example in the newsgroup I mentioned in my other posts so I can reproduce the problem "as is" here ?
Also please tell me which TeeChart Pro version are you using.