Easiest way to save user settings
Posted: 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
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