Monday, February 7, 2011

Why I get an "Canvas does not allow drawing" while drawing in TeeChart ActiveX 5 component?

I'm using Steema's TeeChart ActiveX 5 component for an application in .NET C#.

I do some drawings using the methods Line(), Rectangle() and Circle() through the "Canvas" property of the component.

My code for drawing is called on every on every OnBeforeDrawSeries() and OnAfterDraw() events of the component.

When there is only a few drawings, it works ok. But when the amount of drawing increases and after a certain number of redraws, I get an MessageBox with an error "Canvas does not allow drawing" and the application quits.

I believe this is somehow due to "overloading" the component with drawing calls.

Am I using this functionality the wrong way, or can I consider this a BUG in the component?

  • I would consider this a bug because I have a similar problem (not with Canvas) with this component and the way it manages the memory.

    On some machine with small amount of RAM, when we create a lot of graph and display them, we will receive a message box with this message "Not enough storage available to process this command". Once this box appears, it is impossible to close this box because if you click OK, the message box is displayed again and again. So, you need to kill the application to get ride of it. I think the bug is related to the drawing process because when we close the message box, the component tries to repaint the region where the message box was displayed and the error happens again.

    First, you know that TeeChart ActiveX is now at version 8. Maybe this version resolve this issue.

    I would suggest also to try the .NET version of TeeChart. From my own experience, TeeChart .NET does not have any memory problem since the memory is managed by the .NET framework.

    Jonas : Unfortunately the TeeChart .NET is too slow for my case. I need to plot Series with a lot of points and the performance of TeeChart ActiveX is better.
    From Francis B.

0 comments:

Post a Comment