TeeChart fails on second ShowDialog for a form
Posted: Mon Jun 24, 2013 6:07 am
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.
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.