Frequently Asked Component Specific Questions

Options

Display all FAQ items

Search FAQ items:


Displaying items 1 to 1 of 1, page 1 of 1

<< previous next >>

TMS VCL Chart
Saving and restoring TAdvChartView settings

All properties of the TAdvChartView can be saved to a .Chart file. If you close the application and load the .Chart file, all settings will be restored. Here is an example of saving / reloading settings in code.

Save settings:
procedure TForm1.SaveToFile1Click(Sender: TObject); 
begin 
  if SaveDialog1.Execute then 
  begin 
    AdvChartView1.SaveToFile(SaveDialog1.FileName); 
    ShowMessage('Settings Saved'); 
  end; 
end;
Load settings:
procedure TForm1.LoadSettings1Click(Sender: TObject); 
begin 
  if OpenDialog1.Execute then 
  begin 
    AdvChartView1.LoadFromFile(OpenDialog1.FileName); 
    ShowMessage('Settings Loaded'); 
  end; 
end;