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.
TeeChart Problem
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 :
Have you tried it ?
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;
Pep Jorge
http://support.steema.com
http://support.steema.com
I tried It but it doesn't work
I tried to do it but i couldn't do DoubClick := true;
How can I do to use this source?
How can I do to use this source?
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.
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.
Pep Jorge
http://support.steema.com
http://support.steema.com
I still have the same problem
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.
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.
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;
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;
Pep Jorge
http://support.steema.com
http://support.steema.com
Still fails
Josep, I tried to solve it with Abort as you tell me but it doesn't work. I don't know de reason.
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.
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.
Pep Jorge
http://support.steema.com
http://support.steema.com