Page 1 of 1

Easiest way to save user settings

Posted: Sat Dec 08, 2007 8:55 am
by 9349361
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

Posted: Mon Dec 10, 2007 9:57 am
by narcis
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.

Posted: Mon Dec 10, 2007 10:14 am
by 9349361
Thanks - should have said I'm on D7 and Tee 7 - don't seem to have numbered tutorials, just a number of Examples.

Posted: Mon Dec 10, 2007 10:23 am
by narcis
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!