Saving and loading of user settings

TeeChart for ActiveX, COM and ASP
Post Reply
Bush
Newbie
Newbie
Posts: 50
Joined: Fri Nov 05, 2004 5:00 am

Saving and loading of user settings

Post by Bush » Mon Jul 02, 2007 1:22 pm

Since years we are using import.loadfromfile and export.savetofile to load and save user settings.
We wonder if there is not a better method for this.

We work as follows:
- we have 2 teechart objects on a form: TC and TCCopy
- suppose, TC is displayed with some data
- user now wants to see TC with other data

- at that moment we work as follows
a) save TC to hard disk
b) load saved chart into TCCopy
c) zorder(0) TCCopy
d) changes new data in TC, user can not see the changes because TC is behind TCCopy
e) zorder(0) TC when TC is ready

Using this method, our users, don't see the (ugly) rebuilding of the chart
Changes are down in a second

Has somebody any recommandation?
We tried with autorepaint=false, but autorepaint is always true when import is used.

Kind Regards :roll:

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 Jul 02, 2007 1:35 pm

Hi Bush,

Why don't you try exporting the original chart without its data? There's a boolean flag for this when saving a chart to a .tee file:

Code: Select all

procedure SaveToFile(Const FileName: WideString; IncludeData: WordBool);
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

Bush
Newbie
Newbie
Posts: 50
Joined: Fri Nov 05, 2004 5:00 am

Post by Bush » Tue Jul 03, 2007 11:54 pm

Dear Narcís,

Mny thx your ultrasonore feedback speed.
I didn't know the export.asnative method :oops:
I removed the TCCopy and working with asnative is much better, much less code, faster response.

Kind regards. :)

Post Reply