I have a problem with EditChartPart . I have defined a PartChart as TChartClickedPart in the private part of my source and then I use this source in DblClick event
EditChartPart(Self, DBChartGrafico, PartChart);
DBChart1.CancelMouse := true;
to call the method and then with CancelMouse procedure I try to liberate "memory" but when I close the EditChart Dialog, the selector with mouse become active and draw a select polygon as zoom tool and I don't know how to eliminate it.
Could anyone help me please? It's so important and urgent.
Thanks a lot.
Problem / Question with EditChartPart()
Hi Jym,
I think this problem does not happens with the latest TeeChart Pro version, but to solve it for another versions you can do :
I think this problem does not happens with the latest TeeChart Pro version, but to solve it for another versions you can do :
Code: Select all
procedure TForm1.Chart1DblClick(Sender: TObject);
begin
DoubClick := true;
ChartEditor1.Execute;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues(100);
DoubClick := false;
end;
procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Chart1.CancelMouse := DoubClick;
DoubClick := false;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com
It doesn't works
Hi, I have the same problem. I'm working with Delphi 5.0 and CharEditor hasn't got Execute method and DblClick is not a declarated event so I can't use your code to try to solve my problem.
I don't know how to act with this, I will accept any king of help, thanks
I don't know how to act with this, I will accept any king of help, thanks
Hi Jym,
Could you please post a simple project into the steema.public.attachments newsgroup so I can reproduce the problem here ?
Of which component ?private part of my source and then I use this source in DblClick event
Could you please post a simple project into the steema.public.attachments newsgroup so I can reproduce the problem here ?
Pep Jorge
http://support.steema.com
http://support.steema.com
TDBChart
Hi Pep, my component is a TDBChart and my problem as yoy know 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.
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.
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