Don't TeeStore.SaveChartToFile save all property-value ?
Posted: Sun Aug 25, 2013 5:49 am
hi, i want to save chart's property-value by TeeStore.SaveChartToFile and restore property-value by TeeStore.LoadChartFromFile,
but, Only some property-value are stored.
+++++++++ My Test Step begin ++++++++
Step 1: Run the program, the title's visible is true, and the legend's visible is true.
Step 2: Save the chart to file "c:\1.tee"
Step 3: Change title's visible to false
Step 4: Change legend's visible to false
Step 5: Load chart from file "c:\1.tee"
Now the title's visible is still false, and the legend's visible still false.
------------- My Test Step end --------------
My question is :
1) How to save and restore all property-value of chart?
2) if TeeStore don't support to save and restore all property-value of chart, please give me a list of which properties are not saved.
+++++++++ My program begin ++++++++++
unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, TeeProcs, TeeGalleryPanel, TeeGDIPlus, StdCtrls, TeEngine,
Chart, DBChart, TeeEdit, ComCtrls, Series, DB, DBTables, TeeChineseSimp,
TeeTranslate, TeeDBSumEdit, TeeDBSourceEditor, DBEditCh, TeeDBCrossTab,
TeeExcelSource, TeeSeriesTextEd, TeeXML, TeeDBEdit, TeeSourceEdit, TeeStore;
type
TForm1 = class(TForm)
ChartEditor1: TChartEditor;
Panel1: TPanel;
btnEdit: TButton;
DBChart1: TDBChart;
Series1: TLineSeries;
btnSave: TButton;
btnLoad: TButton;
SaveDialog1: TSaveDialog;
OpenDialog1: TOpenDialog;
procedure btnEditClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure btnSaveClick(Sender: TObject);
procedure btnLoadClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btnSaveClick(Sender: TObject);
begin
if SaveDialog1.Execute then
SaveChartToFile(DBChart1, SaveDialog1.FileName, False, True);
end;
procedure TForm1.btnLoadClick(Sender: TObject);
begin
if OpenDialog1.Execute then
LoadChartFromFile(TCustomChart(DBChart1), OpenDialog1.FileName);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
TeeSetChineseSimp;
TeeTranslateControl(Form1);
end;
procedure TForm1.btnEditClick(Sender: TObject);
begin
ChartEditor1.Execute;
end;
end.
-------------- My program End -------------
but, Only some property-value are stored.
+++++++++ My Test Step begin ++++++++
Step 1: Run the program, the title's visible is true, and the legend's visible is true.
Step 2: Save the chart to file "c:\1.tee"
Step 3: Change title's visible to false
Step 4: Change legend's visible to false
Step 5: Load chart from file "c:\1.tee"
Now the title's visible is still false, and the legend's visible still false.
------------- My Test Step end --------------
My question is :
1) How to save and restore all property-value of chart?
2) if TeeStore don't support to save and restore all property-value of chart, please give me a list of which properties are not saved.
+++++++++ My program begin ++++++++++
unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, TeeProcs, TeeGalleryPanel, TeeGDIPlus, StdCtrls, TeEngine,
Chart, DBChart, TeeEdit, ComCtrls, Series, DB, DBTables, TeeChineseSimp,
TeeTranslate, TeeDBSumEdit, TeeDBSourceEditor, DBEditCh, TeeDBCrossTab,
TeeExcelSource, TeeSeriesTextEd, TeeXML, TeeDBEdit, TeeSourceEdit, TeeStore;
type
TForm1 = class(TForm)
ChartEditor1: TChartEditor;
Panel1: TPanel;
btnEdit: TButton;
DBChart1: TDBChart;
Series1: TLineSeries;
btnSave: TButton;
btnLoad: TButton;
SaveDialog1: TSaveDialog;
OpenDialog1: TOpenDialog;
procedure btnEditClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure btnSaveClick(Sender: TObject);
procedure btnLoadClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btnSaveClick(Sender: TObject);
begin
if SaveDialog1.Execute then
SaveChartToFile(DBChart1, SaveDialog1.FileName, False, True);
end;
procedure TForm1.btnLoadClick(Sender: TObject);
begin
if OpenDialog1.Execute then
LoadChartFromFile(TCustomChart(DBChart1), OpenDialog1.FileName);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
TeeSetChineseSimp;
TeeTranslateControl(Form1);
end;
procedure TForm1.btnEditClick(Sender: TObject);
begin
ChartEditor1.Execute;
end;
end.
-------------- My program End -------------