Multiple repaint/refresh issues (draw to memory?)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Marcus
Newbie
Newbie
Posts: 6
Joined: Fri Nov 15, 2002 12:00 am

Multiple repaint/refresh issues (draw to memory?)

Post by Marcus » Thu Nov 22, 2007 3:55 am

Is it possible for TChart to paint/draw to memory rather than to screen to avoid flashing with multiple repaints/refresh, and then explicitly request the chart to draw to canvas?

Im using the Series::CalcXPos() method to determine pixel positions to display a TColorBandTool. I need to update the start and end values of the colorband on chart zoom events. The problem is that the CalcXPos seems to require the chart repaint to have been executed before i can get the latest values after a zoom event. Then i adjust the colorbandtool start and end values, and finally force another repaint which causes flashing (since its redrawn).

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

Post by Narcís » Thu Nov 22, 2007 10:25 am

Hi Marcus,

You can force TeeChart being internally repainted making a call to Draw method, for examle: Chart1.Draw;. If you don't want TeeChart to repaint automatically you can set AutoRepaint property to false before beginning all drawing process and when finished setting it back to true and refresh the chart, something like what's shown here.

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