Page 1 of 1

TeeChart fails on second ShowDialog for a form

Posted: Mon Jun 24, 2013 6:07 am
by 9644418
We have a complex modal dialog containing TeeChart controls. As the user interacts with the dialog they may change various chart settings then close the dialog. Later, they would like to return to the dialog looking at a different dataset, but with the same display settings. We achieve this by retaining a handle to the dialog and calling ShowDialog again.

This technique should work and did work way back with TeeChart v2. However, with more recent versions of TeeChart, we just see a big red X for the chart the second time it is displayed.

I have uploaded a simple example that demonstrates the issue. You'll notice that the form containing the chart is retained including values set programmatically. The problem seems to be specific to the TeeChart control. You can also see that even if I mess with the Closing event to suppress the call to Close, the TeeChart still does not redisplay correctly.

Re: TeeChart fails on second ShowDialog for a form

Posted: Tue Jun 25, 2013 8:24 am
by narcis
Hi Serafim,

The problem is with the Graphics3D.BufferStyle property when set to BufferStyle.OptimizedBuffer. This functionality was implemented in v3. We will try to fix the issue (TF02016614) for future releases. In the meantime, a workaround is changing BufferStyle at chart creation, for example:

Code: Select all

            tChart1.Graphics3D.BufferStyle = Steema.TeeChart.Drawing.BufferStyle.DoubleBuffer;