Charts don't draw when application receives focus

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
toreba
Newbie
Newbie
Posts: 6
Joined: Wed Nov 10, 2010 12:00 am

Charts don't draw when application receives focus

Post by toreba » Fri Nov 26, 2010 1:27 pm

Hi. I just updated from TeeChart v8.04 to TeeChart 2010 in Delphi 2007, and a new problem has appeared. I have an application that stacks a number of synchronised TCharts. When the application first builds the charts all is well. (first image in attachment). If I then switch to another application (second image), and then back to the first application, without doing anything else other than switch applicaitons, the last chart in the stack doesn't fully redraw (third image). If I rebuild the stack the last chart disappears altogether (fourth image, not allowed). There is a transparent space where the chart should be. Tis happens both within the IDE and with the freestanding compiled executable. Any ideas?

Thanks very much.
Attachments
Charts don't draw when application receives focus.zip
(140.92 KiB) Downloaded 578 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Charts don't draw when application receives focus

Post by Yeray » Fri Nov 26, 2010 3:51 pm

Hi,

Are you using the latest version available in the client area?
Note that this seems very similar to what was discussed here.
toreba wrote:Tis happens both within the IDE and with the freestanding compiled executable
Could you please tell us what exact example in the features demo should we open and what exact steps should we follow to reproduce this problem?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

toreba
Newbie
Newbie
Posts: 6
Joined: Wed Nov 10, 2010 12:00 am

Re: Charts don't draw when application receives focus

Post by toreba » Fri Nov 26, 2010 9:54 pm

I think I'm using the latest version. A TChart announces itself as 'TeeChart Pro v2010.01.11004 Win32'. That's the latest isn't it? We only bought it last week.

I agree that the problem does sound a little like the one you referred me to, although that I am not using TeeCommander or copying the canvas to the clipboard. My problem occurs only when I try to parent TLabels on the TChart to provide extra labelling. I do this with the lines like this:

lblLabel.Parent:=chtChart;
lblLabel.Left:=(lblLabel.Parent as TChart).ChartRect.Right - lblLabel.Width;
lblLabel.Top:=(lblLabel.Parent as TChart).Legend.RectLegend.Top;
lblLabel.Refresh;

In all previous versions of TeeChart since we first started using it over ten years ago, this has worked fine, but now something has changed in TeeChart v2010. It's as though an exception is handled silently, preventing the canvas being redrawn.

If I don't try to add the TLabel, the TChart behaves as beautifully as ever.

Hope that helps...

ChartIt
Newbie
Newbie
Posts: 29
Joined: Tue Mar 13, 2007 12:00 am

Re: Charts don't draw when application receives focus

Post by ChartIt » Mon Nov 29, 2010 7:33 am

TChart 2010, Labels and Repainting:
sounds like a problem I have (had) too...

http://www.teechart.net/support/viewtop ... =3&t=11873

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Charts don't draw when application receives focus

Post by Yeray » Mon Nov 29, 2010 10:32 am

Hi toreba,

As ChartIt says, if the chart repainting problem is caused by a label with the chart as parent, it could be the same problem we've recently identified here (TV52015292). Could you please confirm it?
If that's the problem, while the problem isn't resolved, I'd suggest you the same: use Annotations or Rectangle tool or force the chart repaint when needed.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

toreba
Newbie
Newbie
Posts: 6
Joined: Wed Nov 10, 2010 12:00 am

Re: Charts don't draw when application receives focus

Post by toreba » Tue Nov 30, 2010 1:29 pm

Yeray,

Yes, I think it is the same problem. Similar to ChartIt's description, my chart appears if I click on it, but disappears on releasing the click. When it appears, one of the two parented TLabels is missing.

I think I can use your suggestions to find another way of presenting the labelling information. So thanks to you and ChartIt for the advice.

Post Reply