Hi.
I am having a problem Saving and Loading charts from file.
Here are the 2 procedures:
procedure TfrMain.GraphSaveClick(Sender: TObject);
begin
GraphName := PopupMenuGraph.PopupComponent.Name;
frSave.Show;
end;
procedure TfrMain.GraphOpenClick(Sender: TObject);
var tmpChart:TCustomChart;
File_name: String;
begin
GraphName := PopupMenuGraph.PopupComponent.Name;
For Search := 1 to 40 do
Begin
If GraphName = Graph[Search].Name then
Begin
Found := Search;
Break;
end;
end;
frOpen.Showmodal;
Graph[Found].Free;
tmpChart:=TChart.Create(Self);
File_name := saveUnit.File_name + '.tee';
LoadChartfromFile(tmpChart,File_name);
Graph[Found] := tmpChart as TChart;
Graph[Found].Parent := Page1;
end;
And the other 2:
procedure TfrOpen.btnAcceptClick(Sender: TObject);
begin
File_name := Filelistbox1.Directory + '\' + Filenameedit.Text;
File_name2 := Filelistbox1.Directory + '\';
frOpen.Close;
Closed := false;
end;
procedure TfrSave.btnAcceptClick(Sender: TObject);
var Search, Found: integer;
begin
File_name := Filelistbox1.Directory + '\' + Filenameedit.Text;
File_name2 := Filelistbox1.Directory + '\';
For Search := 1 to 40 do
Begin
If GraphName = Graph[Search].Name then
Begin
Found := Search;
Break;
end;
end;
SaveChartToFile(Graph[Found],File_name,True);
frSave.Close;
Closed := false;
end;
Hope it makes sense. Ask if it doesnt. It doesnt work though. And ive tried everything. :/
Thanks in advance.
Regards
Justin aka thr4sh3r
Saving and Loading Chart from file problems (Please help)
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Justin,
Which are the exact problems you are having? Maybe reading this other thread may help you solving them, specially including TeeEditPro unit.
Which are the exact problems you are having? Maybe reading this other thread may help you solving them, specially including TeeEditPro unit.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Justin,
You're welcome. I'm glad to hear that solved your issue.
BTW: This is already included in the features demo examples .
You're welcome. I'm glad to hear that solved your issue.
BTW: This is already included in the features demo examples .
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 |