Who can help me? Narcis is away.
Ill need to show you quite a bit of code and explain what its doing.
Anyone up for it?
It to do with CloneTools, when i do this it doesnt keep the properties Snapstyle etc. I need it to keep these properties. The problem is, all my charts are created dynamically at runtime.
Thanks in advance.
Regards
Justin
Tool problem
Hi Justin,
are you using similar code to the following to clone the Chart tools ?
The above code might help you clone only chart tools. But you might have to add additional safeguards if for example a tool is connected to specific series and the destination chart doesn't have this series type.
are you using similar code to the following to clone the Chart tools ?
Code: Select all
Function CloneChartTool(ATool:TTeeCustomTool; AOwner: TComponent):TTeeCustomTool;
begin
result:=TTeeCustomToolClass(ATool.ClassType).Create(AOwner);
result.Assign(ATool);
end;
procedure TForm1.Button1Click(Sender: TObject);
var i: Integer;
begin
Chart2.Tools.Clear;
Chart2.Assign(Chart1);
for i:=0 to Chart1.Tools.Count-1 do
CloneChartTool(Chart1.Tools[i],Chart2).ParentChart:=Chart2;
EditChart(Self,Chart2);
end;
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi,
in that case, the only way around this that I know of would be to check which tool type must be copied and depending of the type check the properties which has not been copied and assign them manually.
in that case, the only way around this that I know of would be to check which tool type must be copied and depending of the type check the properties which has not been copied and assign them manually.
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi thr4sh3r,
Please send us a project we can run "as-is" to reproduce the problem here at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
Please send us a project we can run "as-is" to reproduce the problem here at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |