Easiest way to save user settings

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
RichardS
Newbie
Newbie
Posts: 6
Joined: Mon Feb 26, 2007 12:00 am

Easiest way to save user settings

Post by RichardS » Sat Dec 08, 2007 8:55 am

Which is the easiest way to save a user's custom changes to a chart?

eg. at the moment they can fire up the editor at run time and make changes to the colour scheme, position of legend, etc. I'd like to offer them the option to save that as their default layout when they restart the program, so I'd like to do something like:

// After executing editor
if MessageDlg('Make this your default layout and colour scheme?',mtConfirmation,[mbYes,mbNo],0) = mrYes then
Chart1.SavePrefsToFile(SomePath);

// on reloading the form
if FileExists(SomePath) then
Chart1.LoadPrefsFromFile(SomePath);

Thanks,
Richard

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Dec 10, 2007 9:57 am

Hi Richard,

Yes, this is possible using TeeChart template file format. For more information please read Tutorial 12 - Exporting and Importing Charts.

You'll find the tutorials at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

RichardS
Newbie
Newbie
Posts: 6
Joined: Mon Feb 26, 2007 12:00 am

Post by RichardS » Mon Dec 10, 2007 10:14 am

Thanks - should have said I'm on D7 and Tee 7 - don't seem to have numbered tutorials, just a number of Examples.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Dec 10, 2007 10:23 am

Hi Richard,

In that case you'll find the tutorials at TeeChart7Manual.chm in somewhere like C:\Program Files\Steema Software\TeeChart 707 for Delphi 7\Docs.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply